Exception: Authsignal::ApiError
- Inherits:
-
StandardError
- Object
- StandardError
- Authsignal::ApiError
- Defined in:
- lib/authsignal/api_error.rb
Instance Attribute Summary collapse
-
#error_code ⇒ Object
readonly
Returns the value of attribute error_code.
-
#error_description ⇒ Object
readonly
Returns the value of attribute error_description.
-
#status_code ⇒ Object
readonly
Returns the value of attribute status_code.
Instance Method Summary collapse
-
#initialize(status_code, error_code, error_description = nil) ⇒ ApiError
constructor
A new instance of ApiError.
- #to_s ⇒ Object
Constructor Details
#initialize(status_code, error_code, error_description = nil) ⇒ ApiError
Returns a new instance of ApiError.
7 8 9 10 11 12 13 14 15 |
# File 'lib/authsignal/api_error.rb', line 7 def initialize(status_code, error_code, error_description = nil) = (status_code, error_code, error_description) super() @status_code = status_code @error_code = error_code @error_description = error_description end |
Instance Attribute Details
#error_code ⇒ Object (readonly)
Returns the value of attribute error_code.
5 6 7 |
# File 'lib/authsignal/api_error.rb', line 5 def error_code @error_code end |
#error_description ⇒ Object (readonly)
Returns the value of attribute error_description.
5 6 7 |
# File 'lib/authsignal/api_error.rb', line 5 def error_description @error_description end |
#status_code ⇒ Object (readonly)
Returns the value of attribute status_code.
5 6 7 |
# File 'lib/authsignal/api_error.rb', line 5 def status_code @status_code end |
Instance Method Details
#to_s ⇒ Object
17 18 19 |
# File 'lib/authsignal/api_error.rb', line 17 def to_s "#{super} status_code: #{status_code}, error_code: #{error_code}, error_description: #{error_description}" end |