Exception: Increase::Errors::APIStatusError
- Defined in:
- lib/increase/errors.rb
Direct Known Subclasses
AuthenticationError, BadRequestError, ConflictError, InternalServerError, NotFoundError, PermissionDeniedError, RateLimitError, UnprocessableEntityError
Instance Attribute Summary collapse
Attributes inherited from APIError
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(url:, status:, headers:, body:, request:, response:, message: nil) ⇒ APIStatusError
constructor
private
A new instance of APIStatusError.
Constructor Details
#initialize(url:, status:, headers:, body:, request:, response:, message: nil) ⇒ APIStatusError
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
Returns a new instance of APIStatusError.
205 206 207 208 209 210 211 212 213 214 215 216 |
# File 'lib/increase/errors.rb', line 205 def initialize(url:, status:, headers:, body:, request:, response:, message: nil) ||= {url: url.to_s, status: status, body: body} super( url: url, status: status, headers: headers, body: body, request: request, response: response, message: &.to_s ) end |
Instance Attribute Details
#status ⇒ Integer
2 3 4 |
# File 'lib/increase/errors.rb', line 2 def status @status end |
Class Method Details
.for(url:, status:, headers:, body:, request:, response:, message: nil) ⇒ self
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.