Exception: Axene::Mailer::Error
- Inherits:
-
StandardError
- Object
- StandardError
- Axene::Mailer::Error
- Defined in:
- lib/axene/mailer/error.rb
Overview
Instance Attribute Summary collapse
-
#code ⇒ String?
readonly
Machine-readable error code from the API body.
-
#detail ⇒ Object?
readonly
The raw parsed response body, for debugging.
-
#status ⇒ Integer
readonly
HTTP status code (0 for transport failures).
Instance Method Summary collapse
-
#initialize(status, message, code = nil, detail = nil) ⇒ Error
constructor
A new instance of Error.
Constructor Details
#initialize(status, message, code = nil, detail = nil) ⇒ Error
Returns a new instance of Error.
25 26 27 28 29 30 |
# File 'lib/axene/mailer/error.rb', line 25 def initialize(status, , code = nil, detail = nil) super() @status = status @code = code @detail = detail end |
Instance Attribute Details
#code ⇒ String? (readonly)
Returns machine-readable error code from the API body.
16 17 18 |
# File 'lib/axene/mailer/error.rb', line 16 def code @code end |
#detail ⇒ Object? (readonly)
Returns the raw parsed response body, for debugging.
19 20 21 |
# File 'lib/axene/mailer/error.rb', line 19 def detail @detail end |
#status ⇒ Integer (readonly)
Returns HTTP status code (0 for transport failures).
13 14 15 |
# File 'lib/axene/mailer/error.rb', line 13 def status @status end |