Exception: Aws::Errors::ServiceError
- Inherits:
-
RuntimeError
- Object
- RuntimeError
- Aws::Errors::ServiceError
- Defined in:
- gems/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
-
#code ⇒ String
readonly
-
#context ⇒ Seahorse::Client::RequestContext
readonly
The context of the request that triggered the remote service to return this error.
-
#data ⇒ Aws::Structure
Instance Method Summary collapse
-
#initialize(context, message, data = Aws::EmptyStructure.new) ⇒ ServiceError
constructor
A new instance of ServiceError.
-
#retryable? ⇒ Boolean
-
#throttling? ⇒ Boolean
Constructor Details
#initialize(context, message, data = Aws::EmptyStructure.new) ⇒ ServiceError
Returns a new instance of ServiceError.
17 18 19 20 21 22 23 |
# File 'gems/aws-sdk-core/lib/aws-sdk-core/errors.rb', line 17 def initialize(context, , data = Aws::EmptyStructure.new) @code = self.class.code @context = context @data = data @message = && !.empty? ? : self.class.to_s super(@message) end |
Class Attribute Details
.code ⇒ String?
38 39 40 |
# File 'gems/aws-sdk-core/lib/aws-sdk-core/errors.rb', line 38 def code @code end |
Instance Attribute Details
#code ⇒ String (readonly)
26 27 28 |
# File 'gems/aws-sdk-core/lib/aws-sdk-core/errors.rb', line 26 def code @code end |
#context ⇒ Seahorse::Client::RequestContext (readonly)
Returns The context of the request that triggered the remote service to return this error.
30 31 32 |
# File 'gems/aws-sdk-core/lib/aws-sdk-core/errors.rb', line 30 def context @context end |
#data ⇒ Aws::Structure
33 34 35 |
# File 'gems/aws-sdk-core/lib/aws-sdk-core/errors.rb', line 33 def data @data end |
Instance Method Details
#retryable? ⇒ Boolean
43 44 45 |
# File 'gems/aws-sdk-core/lib/aws-sdk-core/errors.rb', line 43 def retryable? false end |
#throttling? ⇒ Boolean
48 49 50 |
# File 'gems/aws-sdk-core/lib/aws-sdk-core/errors.rb', line 48 def throttling? false end |