Method: Mints::Errors::ServiceError#initialize

Defined in:
lib/errors.rb

#initialize(client, title, detail, http_status, response) ⇒ ServiceError

Returns a new instance of ServiceError.

Parameters:

  • client (Client)
  • title (String)
  • detail (String)
  • http_status (Integer)
  • response (String Object Array)


43
44
45
46
47
48
49
50
51
# File 'lib/errors.rb', line 43

def initialize(client, title, detail, http_status, response)
  @title = title
  @client = client
  @response = response
  @http_status = http_status
  @detail = detail && !detail.empty? ? detail : self.class.to_s

  super(@detail)
end