Module: Aws::EC2InstanceConnect::Errors
- Defined in:
- gems/aws-sdk-ec2instanceconnect/lib/aws-sdk-ec2instanceconnect/errors.rb
Overview
When EC2InstanceConnect returns an error response, the Ruby SDK constructs and raises an error. These errors all extend Aws::EC2InstanceConnect::Errors::ServiceError < Aws::Errors::ServiceError
You can rescue all EC2InstanceConnect errors using ServiceError:
begin
# do stuff
rescue Aws::EC2InstanceConnect::Errors::ServiceError
# rescues all EC2InstanceConnect API errors
end
Request Context
ServiceError objects have a #context method that returns information about the request that generated the error. See Seahorse::Client::RequestContext for more information.
Error Classes
- AuthException
- EC2InstanceNotFoundException
- EC2InstanceStateInvalidException
- EC2InstanceTypeInvalidException
- EC2InstanceUnavailableException
- InvalidArgsException
- SerialConsoleAccessDisabledException
- SerialConsoleSessionLimitExceededException
- SerialConsoleSessionUnavailableException
- SerialConsoleSessionUnsupportedException
- ServiceException
- ThrottlingException
Additionally, error classes are dynamically generated for service errors based on the error code if they are not defined above.
Defined Under Namespace
Classes: AuthException, EC2InstanceNotFoundException, EC2InstanceStateInvalidException, EC2InstanceTypeInvalidException, EC2InstanceUnavailableException, InvalidArgsException, SerialConsoleAccessDisabledException, SerialConsoleSessionLimitExceededException, SerialConsoleSessionUnavailableException, SerialConsoleSessionUnsupportedException, ServiceException, ThrottlingException