Exception: Sendmux::Core::ApiError
- Inherits:
-
StandardError
- Object
- StandardError
- Sendmux::Core::ApiError
- Defined in:
- lib/sendmux/core/errors.rb
Instance Attribute Summary collapse
-
#code ⇒ Object
readonly
Returns the value of attribute code.
-
#errors ⇒ Object
readonly
Returns the value of attribute errors.
-
#param ⇒ Object
readonly
Returns the value of attribute param.
-
#request_id ⇒ Object
readonly
Returns the value of attribute request_id.
-
#response_body ⇒ Object
readonly
Returns the value of attribute response_body.
-
#response_headers ⇒ Object
readonly
Returns the value of attribute response_headers.
-
#retryable ⇒ Object
readonly
Returns the value of attribute retryable.
-
#status ⇒ Object
readonly
Returns the value of attribute status.
Instance Method Summary collapse
-
#initialize(status:, code:, message:, retryable:, request_id: nil, param: nil, errors: nil, response_body: nil, response_headers: {}) ⇒ ApiError
constructor
A new instance of ApiError.
Constructor Details
#initialize(status:, code:, message:, retryable:, request_id: nil, param: nil, errors: nil, response_body: nil, response_headers: {}) ⇒ ApiError
Returns a new instance of ApiError.
10 11 12 13 14 15 16 17 18 19 20 21 |
# File 'lib/sendmux/core/errors.rb', line 10 def initialize(status:, code:, message:, retryable:, request_id: nil, param: nil, errors: nil, response_body: nil, response_headers: {}) super() @status = status @code = code @request_id = request_id @param = param @retryable = retryable @errors = errors @response_body = response_body @response_headers = response_headers end |
Instance Attribute Details
#code ⇒ Object (readonly)
Returns the value of attribute code.
8 9 10 |
# File 'lib/sendmux/core/errors.rb', line 8 def code @code end |
#errors ⇒ Object (readonly)
Returns the value of attribute errors.
8 9 10 |
# File 'lib/sendmux/core/errors.rb', line 8 def errors @errors end |
#param ⇒ Object (readonly)
Returns the value of attribute param.
8 9 10 |
# File 'lib/sendmux/core/errors.rb', line 8 def param @param end |
#request_id ⇒ Object (readonly)
Returns the value of attribute request_id.
8 9 10 |
# File 'lib/sendmux/core/errors.rb', line 8 def request_id @request_id end |
#response_body ⇒ Object (readonly)
Returns the value of attribute response_body.
8 9 10 |
# File 'lib/sendmux/core/errors.rb', line 8 def response_body @response_body end |
#response_headers ⇒ Object (readonly)
Returns the value of attribute response_headers.
8 9 10 |
# File 'lib/sendmux/core/errors.rb', line 8 def response_headers @response_headers end |
#retryable ⇒ Object (readonly)
Returns the value of attribute retryable.
8 9 10 |
# File 'lib/sendmux/core/errors.rb', line 8 def retryable @retryable end |
#status ⇒ Object (readonly)
Returns the value of attribute status.
8 9 10 |
# File 'lib/sendmux/core/errors.rb', line 8 def status @status end |