class

Amazonite::Core::QueryResponseExceptionFactory

Inherits Amazonite::Core::ResponseExceptionFactory < Reference < Object

awsQuery and restXml services report errors as XML (<ErrorResponse> <Error><Code>...</Code><Message>...</Message></Error></ErrorResponse>, or a bare <Error> for S3) 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 either protocol's generated ExceptionFactory without any further changes. The <Error> search is unanchored, so it finds the element at either depth.

Instance methods

build(response : HTTP::Client::Response) : ResponseException

Builds the exception for an awsQuery error response, dispatching on the XML <Error><Code> value via #create.

Source