Sha256: 8bf67278d71cf2db312a6764b097a4d5da1d7928bdcae28ef88b7b24b48e1f44
Contents?: true
Size: 461 Bytes
Versions: 15
Compression:
Stored size: 461 Bytes
Contents
# frozen_string_literal: true module SolidusBactracs module Api class RateLimitedError < RequestError attr_reader :retry_in class << self def options_from_response(response) super.merge( retry_in: response.headers['X-Rate-Limit-Reset'].to_i.seconds, ) end end def initialize(retry_in:, **options) super(**options) @retry_in = retry_in end end end end
Version data entries
15 entries across 15 versions & 1 rubygems