Exception: LinodeAPI::HTTPError

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

Overview

A standard HTTP error with an embedded error code

Direct Known Subclasses

RetriedHTTPError, RetryableHTTPError

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(code, msg = 'HTTP Error encountered') ⇒ HTTPError

Returns a new instance of HTTPError.



7
8
9
10
# File 'lib/linodeapi/errors.rb', line 7

def initialize(code, msg = 'HTTP Error encountered')
  @code = code
  super(msg)
end

Instance Attribute Details

#codeObject (readonly)

Returns the value of attribute code.



5
6
7
# File 'lib/linodeapi/errors.rb', line 5

def code
  @code
end