Exception: NakoPay::AuthenticationError

Inherits:
APIError
  • Object
show all
Defined in:
lib/nakopay/errors.rb

Overview

Raised for 401 or authentication_error codes.

Instance Attribute Summary

Attributes inherited from APIError

#code, #doc_url, #param, #request_id, #status_code, #type

Instance Method Summary collapse

Methods inherited from APIError

#retryable?

Constructor Details

#initialize(message: "Invalid API key", **kwargs) ⇒ AuthenticationError

Returns a new instance of AuthenticationError.



27
28
29
30
31
# File 'lib/nakopay/errors.rb', line 27

def initialize(message: "Invalid API key", **kwargs)
  kwargs[:code] ||= "authentication_error"
  kwargs[:type] ||= "authentication_error"
  super(message: message, **kwargs)
end