abstract class
Amazonite::Core::QueryResponseExceptionFactory
- Amazonite::Core::QueryResponseExceptionFactory
- Amazonite::Core::ResponseExceptionFactory
- Reference
- Object
Overview
awsQuery services report errors as XML (<ErrorResponse><Error><Code>... </Code><Message>...</Message></Error>...</ErrorResponse>) rather than
the JSON body ResponseExceptionFactory#build expects, and identify the
error by that text rather than a JSON __type field or header -
overriding #build here (rather than a standalone class) means Core::
Client, which is typed against ResponseExceptionFactory, accepts a
generated query-service ExceptionFactory without any further changes.
Direct Known Subclasses
- Amazonite::CloudFormation::ExceptionFactory
- Amazonite::Iam::ExceptionFactory
- Amazonite::Sns::ExceptionFactory
- Amazonite::Sts::ExceptionFactory
Defined in:
core/query_response_exception_factory.cr
Instance Method Summary
-
#build(response : HTTP::Client::Response) : ResponseException
Builds the exception for an awsQuery error response, dispatching on the XML <Error><Code> value via #create.
Instance methods inherited from class Amazonite::Core::ResponseExceptionFactory
build(response : HTTP::Client::Response) : ResponseException
build,
create(exception_type : String | Nil, http : HTTP::Client::Response, message : String | Nil, code : String | Nil) : ResponseException | Nil
create
Instance Method Detail
def build(response : HTTP::Client::Response) : ResponseException
#
Builds the exception for an awsQuery error response, dispatching on
the XML <Error><Code> value via #create.