Exception: Preverus::ApiError
- Defined in:
- lib/preverus/errors.rb
Instance Attribute Summary collapse
-
#error_code ⇒ Object
readonly
Returns the value of attribute error_code.
-
#response ⇒ Object
readonly
Returns the value of attribute response.
-
#status_code ⇒ Object
readonly
Returns the value of attribute status_code.
Instance Method Summary collapse
-
#initialize(message, status_code: 0, error_code: "api_error", response: {}) ⇒ ApiError
constructor
A new instance of ApiError.
Constructor Details
#initialize(message, status_code: 0, error_code: "api_error", response: {}) ⇒ ApiError
Returns a new instance of ApiError.
9 10 11 12 13 14 |
# File 'lib/preverus/errors.rb', line 9 def initialize(, status_code: 0, error_code: "api_error", response: {}) super() @status_code = status_code @error_code = error_code @response = response end |
Instance Attribute Details
#error_code ⇒ Object (readonly)
Returns the value of attribute error_code.
7 8 9 |
# File 'lib/preverus/errors.rb', line 7 def error_code @error_code end |
#response ⇒ Object (readonly)
Returns the value of attribute response.
7 8 9 |
# File 'lib/preverus/errors.rb', line 7 def response @response end |
#status_code ⇒ Object (readonly)
Returns the value of attribute status_code.
7 8 9 |
# File 'lib/preverus/errors.rb', line 7 def status_code @status_code end |