abstract class Amazonite::Core::QueryResponseExceptionFactory

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

Defined in:

core/query_response_exception_factory.cr

Instance Method Summary

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.


[View source]