Exception: CloudParty::Errors::UnauthorizedError

Inherits:
RequestError
  • Object
show all
Defined in:
lib/cloud_party/exceptions/request_errors/unauthorized_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: 401) ⇒ UnauthorizedError

Returns a new instance of UnauthorizedError.



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

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

Class Method Details

.error_stringObject



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

def self.error_string
  <<~HEREDOC
    There was a '401 -- Unauthorized' error.
  HEREDOC
end

.extra_stringObject



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

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

  HEREDOC
end