Exception: Webex::Errors::Error
- Inherits:
-
StandardError
- Object
- StandardError
- Webex::Errors::Error
- Defined in:
- lib/webex/errors/error.rb
Direct Known Subclasses
AccessTokenIsExpiredError, AuthenticationRequiredError, AuthorizationFailedError, BadGatewayError, BadRequestError, ClientError, ConflictError, DailyQuotaIsReachedError, GatewayTimeoutError, InvalidAccessTokenError, NilStatusError, QueryComplexityIsTooHighError, RequestTimeoutError, ResourceNotFoundError, SecondBasedQuotaIsReachedError, ServerError, ServiceUnavailableError, UnprocessableEntityError
Instance Attribute Summary collapse
-
#code ⇒ Object
readonly
Returns the value of attribute code.
-
#extensions ⇒ Object
readonly
Returns the value of attribute extensions.
-
#response ⇒ Object
readonly
Returns the value of attribute response.
-
#status ⇒ Object
readonly
Returns the value of attribute status.
Instance Method Summary collapse
-
#initialize(response) ⇒ Error
constructor
A new instance of Error.
Constructor Details
#initialize(response) ⇒ Error
Returns a new instance of Error.
9 10 11 12 13 14 15 |
# File 'lib/webex/errors/error.rb', line 9 def initialize(response) @response = response @status = response.status @message = response.body['message'] @extensions = response.body['extensions'] @code = @extensions&.[]('code') end |
Instance Attribute Details
#code ⇒ Object (readonly)
Returns the value of attribute code.
6 7 8 |
# File 'lib/webex/errors/error.rb', line 6 def code @code end |
#extensions ⇒ Object (readonly)
Returns the value of attribute extensions.
6 7 8 |
# File 'lib/webex/errors/error.rb', line 6 def extensions @extensions end |
#response ⇒ Object (readonly)
Returns the value of attribute response.
6 7 8 |
# File 'lib/webex/errors/error.rb', line 6 def response @response end |
#status ⇒ Object (readonly)
Returns the value of attribute status.
6 7 8 |
# File 'lib/webex/errors/error.rb', line 6 def status @status end |