Exception: Listmonk::Error
- Inherits:
-
StandardError
- Object
- StandardError
- Listmonk::Error
- Defined in:
- lib/listmonk/errors.rb,
sig/listmonk.rbs
Direct Known Subclasses
AuthenticationError, BadRequestError, ConfigurationError, ConnectionError, ForbiddenError, GoneError, MethodNotAllowedError, NotFoundError, ParseError, RateLimitError, ServerError, ValidationError
Instance Attribute Summary collapse
-
#response ⇒ Response?
readonly
Returns the value of attribute response.
Instance Method Summary collapse
- #body ⇒ Object
-
#initialize(message = nil, response: nil) ⇒ Error
constructor
A new instance of Error.
- #status ⇒ Integer?
Constructor Details
#initialize(message = nil, response: nil) ⇒ Error
Returns a new instance of Error.
7 8 9 10 |
# File 'lib/listmonk/errors.rb', line 7 def initialize( = nil, response: nil) @response = response super() end |
Instance Attribute Details
#response ⇒ Response? (readonly)
Returns the value of attribute response.
5 6 7 |
# File 'lib/listmonk/errors.rb', line 5 def response @response end |
Instance Method Details
#body ⇒ Object
16 17 18 |
# File 'lib/listmonk/errors.rb', line 16 def body response&.body end |
#status ⇒ Integer?
12 13 14 |
# File 'lib/listmonk/errors.rb', line 12 def status response&.status end |