import { ErrorCode } from './errorCodes';
export declare class ErrorWithCode extends Error {
    code: ErrorCode;
    data?: Record<string, unknown>;
    constructor(code: ErrorCode, message?: string, data?: Record<string, unknown>);
    static get Factory(): Record<keyof typeof ErrorCode, (message?: string, data?: Record<string, any>) => ErrorWithCode>;
}
export declare function getErrorFromUnknown(cause: unknown): Error & {
    statusCode?: number;
    code?: string;
};
export declare function handleErrorsJson<Type>(response: Response): Promise<Type>;
export declare function handleErrorsRaw(response: Response): Promise<string> | "{}";
//# sourceMappingURL=errors.d.ts.map