import { MetadataBearer } from '@aws-sdk/types'; import { HttpResponse } from '@aws-amplify/core/internals/aws-client-utils'; import { RestApiError } from '../errors'; /** * Parses both AWS and non-AWS error responses coming from the users' backend code. * * AWS errors generated by the AWS services(e.g. API Gateway, Bedrock). They can be Signature errors, * ClockSkew errors, etc. These responses will be parsed to errors with proper name and message from the AWS * services. * * non-AWS errors thrown by the user code. They can contain any headers or body. Users need to access the * error.response to get the headers and body and parse them accordingly. The JS error name and message will * be `UnknownError` and `Unknown error` respectively. */ export declare const parseRestApiServiceError: (response?: HttpResponse) => Promise<(RestApiError & MetadataBearer) | undefined>;