Exception: Pago::RateLimitError

Inherits:
ClientError show all
Defined in:
lib/pago/errors.rb

Overview

Raised for 429 responses.

Instance Attribute Summary collapse

Attributes inherited from APIError

#body, #data, #response, #status_code

Instance Method Summary collapse

Constructor Details

#initialize(message = nil, retry_after: nil, **options) ⇒ RateLimitError

Returns a new instance of RateLimitError.



54
55
56
57
# File 'lib/pago/errors.rb', line 54

def initialize(message = nil, retry_after: nil, **options)
  @retry_after = retry_after
  super(message, **options)
end

Instance Attribute Details

#retry_afterInteger? (readonly)

Returns the value of the Retry-After header, in seconds.

Returns:

  • (Integer, nil)

    the value of the Retry-After header, in seconds.



52
53
54
# File 'lib/pago/errors.rb', line 52

def retry_after
  @retry_after
end