abstract class
Amazonite::Core::ResponseExceptionFactory
- Amazonite::Core::ResponseExceptionFactory
- Reference
- Object
Overview
Builds the ResponseException for an error response. Each generated
service module has its own subclass implementing #create to map the
service's exception type name to its generated exception class;
Client calls #build on that instance whenever a request fails.
Direct Known Subclasses
- Amazonite::ApiGateway::ExceptionFactory
- Amazonite::CloudWatch::ExceptionFactory
- Amazonite::CloudWatchLogs::ExceptionFactory
- Amazonite::Core::QueryResponseExceptionFactory
- Amazonite::DynamoDB::ExceptionFactory
- Amazonite::EventBridge::ExceptionFactory
- Amazonite::Kinesis::ExceptionFactory
- Amazonite::Kms::ExceptionFactory
- Amazonite::Lambda::ExceptionFactory
- Amazonite::SecretsManager::ExceptionFactory
- Amazonite::Sqs::ExceptionFactory
- Amazonite::Ssm::ExceptionFactory
Defined in:
core/response_exception_factory.crInstance Method Summary
-
#build(response : HTTP::Client::Response) : ResponseException
Builds the exception for a JSON (awsJson/rest-json) error response, dispatching on the
x-amzn-errortypeheader or the body's__typefield via#create. -
#create(exception_type : String | Nil, http : HTTP::Client::Response, message : String | Nil, code : String | Nil) : ResponseException | Nil
Returns the specific exception for
exception_type(the service's exception type name, e.g.
Instance Method Detail
Builds the exception for a JSON (awsJson/rest-json) error response,
dispatching on the x-amzn-errortype header or the body's __type
field via #create.
Returns the specific exception for exception_type (the service's
exception type name, e.g. "ResourceNotFoundException"), or nil if
the service doesn't declare that exception type - in which case
#build falls back to a generic ResponseException.