Exception: IpApiIo::Error
- Inherits:
-
StandardError
- Object
- StandardError
- IpApiIo::Error
- Defined in:
- lib/ipapi_io/errors.rb
Overview
Base error for all ip-api.io client failures.
Direct Known Subclasses
AuthenticationError, InvalidRequestError, RateLimitError, ServerError
Instance Attribute Summary collapse
-
#body ⇒ Object
readonly
Returns the value of attribute body.
-
#status_code ⇒ Object
readonly
Returns the value of attribute status_code.
Instance Method Summary collapse
-
#initialize(message, status_code: nil, body: nil) ⇒ Error
constructor
A new instance of Error.
Constructor Details
#initialize(message, status_code: nil, body: nil) ⇒ Error
Returns a new instance of Error.
6 7 8 9 10 |
# File 'lib/ipapi_io/errors.rb', line 6 def initialize(, status_code: nil, body: nil) super() @status_code = status_code @body = body end |
Instance Attribute Details
#body ⇒ Object (readonly)
Returns the value of attribute body.
4 5 6 |
# File 'lib/ipapi_io/errors.rb', line 4 def body @body end |
#status_code ⇒ Object (readonly)
Returns the value of attribute status_code.
4 5 6 |
# File 'lib/ipapi_io/errors.rb', line 4 def status_code @status_code end |