Exception: CloudParty::Errors::BadRequestError

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

Overview

Request was invalid

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: 400) ⇒ BadRequestError

Returns a new instance of BadRequestError.



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

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

Class Method Details

.error_stringObject



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

def self.error_string
  <<~HEREDOC
    There was a '400 -- Bad Request' error.
  HEREDOC
end

.extra_stringObject



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

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

  HEREDOC
end