Exception: Gcloud::Storage::ApiError

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

Overview

ApiError

Raised when an API call is not successful.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(message, code, errors) ⇒ ApiError

Returns a new instance of ApiError


40
41
42
43
44
# File 'lib/gcloud/storage/errors.rb', line 40

def initialize message, code, errors
  super message
  @code   = code
  @errors = errors
end

Instance Attribute Details

#codeObject (readonly)

The code of the error.


34
35
36
# File 'lib/gcloud/storage/errors.rb', line 34

def code
  @code
end

#errorsObject (readonly)

The errors encountered.


38
39
40
# File 'lib/gcloud/storage/errors.rb', line 38

def errors
  @errors
end