Exception: Peatio::Auth::Error
- Defined in:
- lib/peatio/auth/error.rb
Overview
Error repesent all errors that can be returned from Auth module.
Instance Attribute Summary collapse
-
#reason ⇒ String, JWT::*
readonly
Reason store underlying reason for given error.
Attributes inherited from Error
Instance Method Summary collapse
-
#initialize(reason = nil) ⇒ Error
constructor
A new instance of Error.
Constructor Details
#initialize(reason = nil) ⇒ Error
Returns a new instance of Error.
9 10 11 12 13 14 15 16 |
# File 'lib/peatio/auth/error.rb', line 9 def initialize(reason = nil) @reason = reason super( code: 2001, text: "Authorization failed".tap { |t| t << ": #{reason}" if reason }, ) end |
Instance Attribute Details
#reason ⇒ String, JWT::* (readonly)
Returns Reason store underlying reason for given error.
7 8 9 |
# File 'lib/peatio/auth/error.rb', line 7 def reason @reason end |