Sha256: 44a3ca3f0952ab189b25135567aa66a284650fe2d3a1f5e55b52bbd8f541f107

Contents?: true

Size: 574 Bytes

Versions: 7

Compression:

Stored size: 574 Bytes

Contents

# frozen_string_literal: true

require 'cloud_party/exception'
module CloudParty
  module Errors
    # Page/Endpoint doesn't exist
    class TooManyRequestsError < RequestError
      def initialize(obj:, method:, response:, endpoint: nil, code: 429)
        super
      end

      def self.error_string
        <<~HEREDOC
          There was a '429 -- Too many requests' error.
          You've hit the rate limit of Cloudflare
        HEREDOC
      end

      def self.extra_string
        <<~HEREDOC
          VERB: #{@method}

        HEREDOC
      end
    end
  end
end

Version data entries

7 entries across 7 versions & 1 rubygems

Version Path
cloud_party-0.1.7 lib/cloud_party/exceptions/request_errors/too_many_requests_error.rb
cloud_party-0.1.6 lib/cloud_party/exceptions/request_errors/too_many_requests_error.rb
cloud_party-0.1.5 lib/cloud_party/exceptions/request_errors/too_many_requests_error.rb
cloud_party-0.1.4 lib/cloud_party/exceptions/request_errors/too_many_requests_error.rb
cloud_party-0.1.3 lib/cloud_party/exceptions/request_errors/too_many_requests_error.rb
cloud_party-0.1.2 lib/cloud_party/exceptions/request_errors/too_many_requests_error.rb
cloud_party-0.1.1 lib/cloud_party/exceptions/request_errors/too_many_requests_error.rb