Exception: SabreApiRuby::APIError
- Defined in:
- lib/sabre_api_ruby/errors.rb
Direct Known Subclasses
AuthenticationError, NotFoundError, RateLimitError, ServerError, ValidationError
Instance Attribute Summary collapse
-
#error_code ⇒ Object
readonly
Returns the value of attribute error_code.
-
#response_body ⇒ Object
readonly
Returns the value of attribute response_body.
-
#status_code ⇒ Object
readonly
Returns the value of attribute status_code.
Instance Method Summary collapse
-
#initialize(message, status_code = nil, error_code = nil, response_body = nil) ⇒ APIError
constructor
A new instance of APIError.
Constructor Details
#initialize(message, status_code = nil, error_code = nil, response_body = nil) ⇒ APIError
Returns a new instance of APIError.
11 12 13 14 15 16 |
# File 'lib/sabre_api_ruby/errors.rb', line 11 def initialize(, status_code = nil, error_code = nil, response_body = nil) super() @status_code = status_code @error_code = error_code @response_body = response_body end |
Instance Attribute Details
#error_code ⇒ Object (readonly)
Returns the value of attribute error_code.
9 10 11 |
# File 'lib/sabre_api_ruby/errors.rb', line 9 def error_code @error_code end |
#response_body ⇒ Object (readonly)
Returns the value of attribute response_body.
9 10 11 |
# File 'lib/sabre_api_ruby/errors.rb', line 9 def response_body @response_body end |
#status_code ⇒ Object (readonly)
Returns the value of attribute status_code.
9 10 11 |
# File 'lib/sabre_api_ruby/errors.rb', line 9 def status_code @status_code end |