Exception: Cronofy::APIError
- Inherits:
-
CronofyError
- Object
- StandardError
- CronofyError
- Cronofy::APIError
- Defined in:
- lib/cronofy/errors.rb
Direct Known Subclasses
AccountLockedError, AuthenticationFailureError, AuthorizationFailureError, BadRequestError, InvalidRequestError, NotFoundError, PaymentRequiredError, ServerError, ServiceUnreachableError, TooManyRequestsError, UnknownError
Instance Attribute Summary collapse
-
#response ⇒ Object
readonly
Returns the value of attribute response.
Instance Method Summary collapse
- #body ⇒ Object
- #headers ⇒ Object
-
#initialize(message, response = nil) ⇒ APIError
constructor
A new instance of APIError.
- #inspect ⇒ Object
Constructor Details
#initialize(message, response = nil) ⇒ APIError
Returns a new instance of APIError.
14 15 16 17 |
# File 'lib/cronofy/errors.rb', line 14 def initialize(, response=nil) super() @response = response end |
Instance Attribute Details
#response ⇒ Object (readonly)
Returns the value of attribute response.
12 13 14 |
# File 'lib/cronofy/errors.rb', line 12 def response @response end |
Instance Method Details
#body ⇒ Object
19 20 21 |
# File 'lib/cronofy/errors.rb', line 19 def body response.body if response end |
#headers ⇒ Object
23 24 25 |
# File 'lib/cronofy/errors.rb', line 23 def headers response.headers if response end |
#inspect ⇒ Object
27 28 29 |
# File 'lib/cronofy/errors.rb', line 27 def inspect "<#{self.class.name} message=#{} headers=#{headers.inspect} body=#{body}>" end |