Exception: Dscf::Core::AuthenticationError
- Inherits:
-
StandardError
- Object
- StandardError
- Dscf::Core::AuthenticationError
- Defined in:
- app/errors/dscf/core/authentication_error.rb
Instance Attribute Summary collapse
-
#status_code ⇒ Object
readonly
Returns the value of attribute status_code.
Instance Method Summary collapse
-
#initialize(message = "Authentication failed", status_code = 401) ⇒ AuthenticationError
constructor
A new instance of AuthenticationError.
- #to_hash ⇒ Object
Constructor Details
#initialize(message = "Authentication failed", status_code = 401) ⇒ AuthenticationError
Returns a new instance of AuthenticationError.
6 7 8 9 |
# File 'app/errors/dscf/core/authentication_error.rb', line 6 def initialize( = "Authentication failed", status_code = 401) super() @status_code = status_code end |
Instance Attribute Details
#status_code ⇒ Object (readonly)
Returns the value of attribute status_code.
4 5 6 |
# File 'app/errors/dscf/core/authentication_error.rb', line 4 def status_code @status_code end |
Instance Method Details
#to_hash ⇒ Object
11 12 13 14 15 16 |
# File 'app/errors/dscf/core/authentication_error.rb', line 11 def to_hash { error: , status: status_code } end |