Exception: PostmarkClient::ApiError
- Defined in:
- lib/postmark_client/errors.rb
Overview
Raised when the Postmark API returns an error response
Instance Attribute Summary collapse
-
#error_code ⇒ Integer, ...
readonly
The Postmark error code.
-
#response ⇒ Hash?
readonly
The full error response body.
Instance Method Summary collapse
-
#initialize(message, error_code: nil, response: nil) ⇒ ApiError
constructor
Initialize a new API error.
Constructor Details
#initialize(message, error_code: nil, response: nil) ⇒ ApiError
Initialize a new API error
40 41 42 43 44 |
# File 'lib/postmark_client/errors.rb', line 40 def initialize(, error_code: nil, response: nil) @error_code = error_code @response = response super() end |
Instance Attribute Details
#error_code ⇒ Integer, ... (readonly)
Returns the Postmark error code.
30 31 32 |
# File 'lib/postmark_client/errors.rb', line 30 def error_code @error_code end |
#response ⇒ Hash? (readonly)
Returns the full error response body.
33 34 35 |
# File 'lib/postmark_client/errors.rb', line 33 def response @response end |