import { HttpError } from '@metamask/controller-utils'; /** * Thrown when a response from the Money Account API fails superstruct * validation. Indicates a contract mismatch between client and server. */ export declare class MoneyAccountApiResponseValidationError extends Error { constructor(message?: string); } export declare const MAX_RESPONSE_BODY_LENGTH = 1000; export declare const REDACTED_ADDRESS = "0x[redacted]"; /** * Thrown when the Money Account API responds with a non-2xx status. Carries * the response body and diagnostic headers so consumers can report failures * with enough detail to debug them. * * The API can echo the requested URL or address in error messages, so every * hex address in the body is redacted and the body is truncated. */ export declare class MoneyAccountApiHttpError extends HttpError { readonly responseBody: string | null; readonly responseHeaders: Record; constructor({ status, message, responseBody, responseHeaders, }: { status: number; message?: string; responseBody?: string | null; responseHeaders?: Record; }); /** * Builds an error from a failed response, reading and sanitizing its body. * * @param response - The non-2xx response. * @param message - The error message. * @returns The error. */ static fromResponse(response: Response, message: string): Promise; } //# sourceMappingURL=errors.d.ts.map