Exception: PetstoreApiClient::Error

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

Overview

Base error class - all our exceptions inherit from this

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(message = nil, status_code: nil, error_type: nil) ⇒ Error

Returns a new instance of Error.



8
9
10
11
12
# File 'lib/petstore_api_client/errors.rb', line 8

def initialize(message = nil, status_code: nil, error_type: nil)
  @status_code = status_code
  @error_type = error_type
  super(message)
end

Instance Attribute Details

#error_typeObject (readonly)

Returns the value of attribute error_type.



6
7
8
# File 'lib/petstore_api_client/errors.rb', line 6

def error_type
  @error_type
end

#status_codeObject (readonly)

Returns the value of attribute status_code.



6
7
8
# File 'lib/petstore_api_client/errors.rb', line 6

def status_code
  @status_code
end