Exception: Aws::Errors::ServiceError
- Inherits:
- 
      RuntimeError
      
        - Object
- RuntimeError
- Aws::Errors::ServiceError
 
- Defined in:
- 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. 
Instance Method Summary collapse
- 
  
    
      #initialize(context, message)  ⇒ ServiceError 
    
    
  
  
  
    constructor
  
  
  
  
  
  
  
    A new instance of ServiceError. 
Constructor Details
#initialize(context, message) ⇒ ServiceError
Returns a new instance of ServiceError.
| 16 17 18 19 20 | # File 'lib/aws-sdk-core/errors.rb', line 16 def initialize(context, ) @code = self.class.code @context = context super() end | 
Class Attribute Details
.code ⇒ String
| 32 33 34 | # File 'lib/aws-sdk-core/errors.rb', line 32 def code @code end | 
Instance Attribute Details
#code ⇒ String (readonly)
| 23 24 25 | # File 'lib/aws-sdk-core/errors.rb', line 23 def code @code end | 
#context ⇒ Seahorse::Client::RequestContext (readonly)
Returns The context of the request that triggered the remote service to return this error.
| 27 28 29 | # File 'lib/aws-sdk-core/errors.rb', line 27 def context @context end |