Exception: Fluence::Gateway::RateLimitedError

Inherits:
RequestError show all
Defined in:
lib/fluence/gateway/errors.rb

Overview

Raised when the gateway answered 429: the caller exceeded its request quota. The request itself was fine — wait, then retry.

Examples:

Back off when throttled

begin
  Fluence::Gateway::Client.get('/v2/trading_venues', tenant: :mosaic)
rescue Fluence::Gateway::RateLimitedError
  sleep 5
  retry
end

Instance Attribute Summary

Attributes inherited from RequestError

#body, #headers, #status

Method Summary

Methods inherited from RequestError

build, #initialize

Constructor Details

This class inherits a constructor from Fluence::Gateway::RequestError