Exception: ScreenshotFreeAPI::ScreenshotFreeAPIError
- Inherits:
-
StandardError
- Object
- StandardError
- ScreenshotFreeAPI::ScreenshotFreeAPIError
- Defined in:
- lib/screenshotfreeapi/errors.rb
Overview
Base error class for all ScreenshotFreeAPI errors that originate from HTTP responses.
Direct Known Subclasses
AuthenticationError, ForbiddenError, NotFoundError, PaymentRequiredError, QuotaExceededError, RateLimitError, ValidationError
Instance Attribute Summary collapse
-
#details ⇒ Object
readonly
Returns the value of attribute details.
-
#error_code ⇒ Object
readonly
Returns the value of attribute error_code.
-
#status_code ⇒ Object
readonly
Returns the value of attribute status_code.
Instance Method Summary collapse
-
#initialize(status_code, error_code, message, details = nil) ⇒ ScreenshotFreeAPIError
constructor
A new instance of ScreenshotFreeAPIError.
Constructor Details
#initialize(status_code, error_code, message, details = nil) ⇒ ScreenshotFreeAPIError
Returns a new instance of ScreenshotFreeAPIError.
8 9 10 11 12 13 |
# File 'lib/screenshotfreeapi/errors.rb', line 8 def initialize(status_code, error_code, , details = nil) super() @status_code = status_code @error_code = error_code @details = details end |
Instance Attribute Details
#details ⇒ Object (readonly)
Returns the value of attribute details.
6 7 8 |
# File 'lib/screenshotfreeapi/errors.rb', line 6 def details @details end |
#error_code ⇒ Object (readonly)
Returns the value of attribute error_code.
6 7 8 |
# File 'lib/screenshotfreeapi/errors.rb', line 6 def error_code @error_code end |
#status_code ⇒ Object (readonly)
Returns the value of attribute status_code.
6 7 8 |
# File 'lib/screenshotfreeapi/errors.rb', line 6 def status_code @status_code end |