import { RequestConfig } from '../Request'; import { HttpResponse } from '../Response'; /** * Update an Error with the specified config, error code, and response. * * @param {Error} error The error to update. * @param {Object} config The config. * @param {string} [code] The error code (for example, 'ECONNABORTED'). * @param {Object} [request] The request. * @param {Object} [response] The response. * @returns {Error} The error. */ declare const enhanceError: (error: Error & Record, config?: object | undefined, code?: string | null | undefined, request?: object | undefined, response?: object | undefined) => Error & Partial<{ config: RequestConfig; code: string; request: any; response: HttpResponse; }> & { toJSON: () => Record; }; /** * Create an Error with the specified message, config, error code, request and response. * * @param {string} message The error message. * @param {Object} config The config. * @param {string} [code] The error code (for example, 'ECONNABORTED'). * @param {Object} [request] The request. * @param {Object} [response] The response. * @returns {Error} The created error. */ declare const createError: (message: string, config?: object | undefined, code?: string | null | undefined, request?: object | undefined, response?: object | undefined) => Error & Partial<{ config: RequestConfig; code: string; request: any; response: HttpResponse; }> & { toJSON: () => Record; }; export { createError, enhanceError }; //# sourceMappingURL=createError.d.ts.map