Exception: Demografix::Error
- Inherits:
-
StandardError
- Object
- StandardError
- Demografix::Error
- Defined in:
- lib/demografix/errors.rb
Overview
Base class for every error the SDK raises. Carries the HTTP status (when one is known), the server-provided message, and the quota parsed from the rate-limit headers (when present).
Direct Known Subclasses
AuthError, RateLimitError, SubscriptionError, TransportError, ValidationError
Instance Attribute Summary collapse
-
#quota ⇒ Object
readonly
Returns the value of attribute quota.
-
#status ⇒ Object
readonly
Returns the value of attribute status.
Instance Method Summary collapse
-
#initialize(message = nil, status: nil, quota: nil) ⇒ Error
constructor
A new instance of Error.
Constructor Details
#initialize(message = nil, status: nil, quota: nil) ⇒ Error
Returns a new instance of Error.
10 11 12 13 14 |
# File 'lib/demografix/errors.rb', line 10 def initialize( = nil, status: nil, quota: nil) super() @status = status @quota = quota end |
Instance Attribute Details
#quota ⇒ Object (readonly)
Returns the value of attribute quota.
8 9 10 |
# File 'lib/demografix/errors.rb', line 8 def quota @quota end |
#status ⇒ Object (readonly)
Returns the value of attribute status.
8 9 10 |
# File 'lib/demografix/errors.rb', line 8 def status @status end |