Exception: Aws::Errors::ServiceError

Inherits:
RuntimeError
  • Object
show all
Defined in:
aws-sdk-core/lib/aws-sdk-core/errors.rb

Overview

The base class for all errors returned by an Amazon Web Service. All ~400 level client errors and ~500 level server errors are raised as service errors. This indicates it was an error returned from the service and not one generated by the client.

Class Attribute Summary collapse

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(context, message) ⇒ ServiceError


16
17
18
19
20
# File 'aws-sdk-core/lib/aws-sdk-core/errors.rb', line 16

def initialize(context, message)
  @code = self.class.code
  @context = context
  super(message)
end

Class Attribute Details

.codeString


32
33
34
# File 'aws-sdk-core/lib/aws-sdk-core/errors.rb', line 32

def code
  @code
end

Instance Attribute Details

#codeString (readonly)


23
24
25
# File 'aws-sdk-core/lib/aws-sdk-core/errors.rb', line 23

def code
  @code
end

#contextSeahorse::Client::RequestContext (readonly)


27
28
29
# File 'aws-sdk-core/lib/aws-sdk-core/errors.rb', line 27

def context
  @context
end