Exception: Digitalocean::ClientError
- Defined in:
- lib/digitalocean/errors.rb
Instance Attribute Summary collapse
-
#id ⇒ Object
Returns the value of attribute id.
Attributes inherited from Error
Instance Method Summary collapse
-
#initialize(response) ⇒ ClientError
constructor
A new instance of ClientError.
Methods inherited from Error
Constructor Details
#initialize(response) ⇒ ClientError
Returns a new instance of ClientError.
32 33 34 35 36 37 38 |
# File 'lib/digitalocean/errors.rb', line 32 def initialize(response) @message = response.json["message"] @id = response.json["id"] @code = response.status rescue StandardError @message = "Uncatched Error" end |
Instance Attribute Details
#id ⇒ Object
Returns the value of attribute id.
30 31 32 |
# File 'lib/digitalocean/errors.rb', line 30 def id @id end |