Exception: ServiceClient::Errors::BaseError

Inherits:
StandardError
  • Object
show all
Defined in:
lib/service_client/errors.rb

Overview

BaseError class

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(msg, response) ⇒ BaseError

Initializes a new instance of the BaseError class with the given message and HTTP response.

Parameters:

  • The error message.

  • The HTTP response that caused the error.



15
16
17
18
# File 'lib/service_client/errors.rb', line 15

def initialize(msg, response)
  @response = response
  super(msg)
end

Instance Attribute Details

#responseHTTParty::Response (readonly)

Returns the HTTP response that caused the error.

Returns:

  • The HTTP response.



22
23
24
# File 'lib/service_client/errors.rb', line 22

def response
  @response
end