public HttpResponseHandler<SdkBaseException> createErrorResponseHandler(
            JsonErrorResponseMetadata errorResponsMetadata) {
        return new ApiGatewayErrorResponseHandler(
                createErrorUnmarshallers(errorResponsMetadata.getErrorShapes().stream()),
                SdkStructuredPlainJsonFactory.JSON_FACTORY);
    }
Creates a response handler for handling a error response (non 2xx response).
aws-java-sdk-opensdk/src/main/java/com/amazonaws/opensdk/protect/protocol/ApiGatewayProtocolFactoryImpl.java