Exception: CardDB::ServerError

Inherits:
Error
  • Object
show all
Defined in:
lib/carddb/errors.rb

Overview

Raised when the server returns an unexpected response

Instance Attribute Summary collapse

Attributes inherited from Error

#response

Instance Method Summary collapse

Constructor Details

#initialize(message = nil, status: nil, response: nil) ⇒ ServerError

Returns a new instance of ServerError.



77
78
79
80
# File 'lib/carddb/errors.rb', line 77

def initialize(message = nil, status: nil, response: nil)
  @status = status
  super(message, response: response)
end

Instance Attribute Details

#statusInteger? (readonly)

Returns HTTP status code.

Returns:

  • (Integer, nil)

    HTTP status code



75
76
77
# File 'lib/carddb/errors.rb', line 75

def status
  @status
end