Exception: Elevate::HTTP::RequestError

Inherits:
RuntimeError
  • Object
show all
Defined in:
lib/elevate/http/errors.rb

Overview

Raised when a request could not be completed.

Direct Known Subclasses

OfflineError

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(error) ⇒ RequestError

Returns a new instance of RequestError.



5
6
7
8
9
# File 'lib/elevate/http/errors.rb', line 5

def initialize(error)
  super(error.localizedDescription)

  @code = error.code
end

Instance Attribute Details

#codeObject (readonly)

Returns the value of attribute code.



11
12
13
# File 'lib/elevate/http/errors.rb', line 11

def code
  @code
end