Exception: NwcRuby::WalletServiceError
- Defined in:
- lib/nwc_ruby/errors.rb
Overview
The wallet service returned an error envelope. ‘#code` is the NIP-47 error code (one of RATE_LIMITED, NOT_IMPLEMENTED, INSUFFICIENT_BALANCE, QUOTA_EXCEEDED, RESTRICTED, UNAUTHORIZED, INTERNAL, UNSUPPORTED_ENCRYPTION, PAYMENT_FAILED, NOT_FOUND, or OTHER).
Instance Attribute Summary collapse
-
#code ⇒ Object
readonly
Returns the value of attribute code.
Instance Method Summary collapse
-
#initialize(code, message) ⇒ WalletServiceError
constructor
A new instance of WalletServiceError.
Constructor Details
#initialize(code, message) ⇒ WalletServiceError
Returns a new instance of WalletServiceError.
27 28 29 30 |
# File 'lib/nwc_ruby/errors.rb', line 27 def initialize(code, ) @code = code super("#{code}: #{}") end |
Instance Attribute Details
#code ⇒ Object (readonly)
Returns the value of attribute code.
25 26 27 |
# File 'lib/nwc_ruby/errors.rb', line 25 def code @code end |