Exception: CloudParty::Errors::TooManyRequestsError

Inherits:
RequestError
  • Object
show all
Defined in:
lib/cloud_party/exceptions/request_errors/too_many_requests_error.rb

Overview

Page/Endpoint doesn’t exist

Class Method Summary collapse

Instance Method Summary collapse

Methods inherited from RequestError

#error_string, #extra_string, #to_s

Constructor Details

#initialize(obj:, method:, response:, endpoint: nil, code: 429) ⇒ TooManyRequestsError

Returns a new instance of TooManyRequestsError.



8
9
10
# File 'lib/cloud_party/exceptions/request_errors/too_many_requests_error.rb', line 8

def initialize(obj:, method:, response:, endpoint: nil, code: 429)
  super
end

Class Method Details

.error_stringObject



12
13
14
15
16
17
# File 'lib/cloud_party/exceptions/request_errors/too_many_requests_error.rb', line 12

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

.extra_stringObject



19
20
21
22
23
24
# File 'lib/cloud_party/exceptions/request_errors/too_many_requests_error.rb', line 19

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

  HEREDOC
end