Sha256: b0277466575eedbb1f8737cdfb5d850b2a7738dcbb0b0f8a97df121673e20aa1
Contents?: true
Size: 462 Bytes
Versions: 8
Compression:
Stored size: 462 Bytes
Contents
# frozen_string_literal: true module SolidusBacktracs 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
8 entries across 8 versions & 2 rubygems