Exception: Authsignal::ApiError
- Inherits:
-
StandardError
- Object
- StandardError
- Authsignal::ApiError
- Defined in:
- lib/authsignal/api_error.rb
Instance Attribute Summary collapse
-
#description ⇒ Object
readonly
Returns the value of attribute description.
-
#error ⇒ Object
readonly
Returns the value of attribute error.
-
#status ⇒ Object
readonly
Returns the value of attribute status.
Instance Method Summary collapse
-
#initialize(message = "An unexpected API error occurred", status, error, description) ⇒ ApiError
constructor
A new instance of ApiError.
- #to_s ⇒ Object
Constructor Details
#initialize(message = "An unexpected API error occurred", status, error, description) ⇒ ApiError
Returns a new instance of ApiError.
7 8 9 10 11 12 13 |
# File 'lib/authsignal/api_error.rb', line 7 def initialize( = "An unexpected API error occurred", status, error, description) @status = status || 500 @error = error @description = description super() end |
Instance Attribute Details
#description ⇒ Object (readonly)
Returns the value of attribute description.
5 6 7 |
# File 'lib/authsignal/api_error.rb', line 5 def description @description end |
#error ⇒ Object (readonly)
Returns the value of attribute error.
5 6 7 |
# File 'lib/authsignal/api_error.rb', line 5 def error @error end |
#status ⇒ Object (readonly)
Returns the value of attribute status.
5 6 7 |
# File 'lib/authsignal/api_error.rb', line 5 def status @status end |
Instance Method Details
#to_s ⇒ Object
15 16 17 |
# File 'lib/authsignal/api_error.rb', line 15 def to_s "#{super} status: #{status}, error: #{error}, description: #{description}" end |