import { IHttpResponse, HttpResponse } from './HttpResponse.js';
import { ErrorResponse as LegacyErrorResponse } from './legacy/request/ArcResponse.js';
import { SerializableError, ISerializedError } from './SerializableError.js';
export interface IErrorResponse extends IHttpResponse {
    /**
     * An error associated with the response
     */
    error: string | ISerializedError;
}
export declare class ErrorResponse extends HttpResponse {
    /**
     * An error associated with the response
     */
    error: SerializableError;
    /**
     * @returns The same Error or new Error instance when passed string.
     */
    static ensureError(error: string | Error | SerializableError): SerializableError;
    /**
     * @param error The error message or Error object to use.
     */
    static fromError(error: Error | SerializableError | string): ErrorResponse;
    static fromLegacy(input: LegacyErrorResponse): Promise<ErrorResponse>;
    /**
     * @param input The request definition used to restore the state.
     */
    constructor(input?: string | IErrorResponse);
    /**
     * Creates a new request clearing anything that is so far defined.
     *
     * Note, this throws an error when the object is not an API Client request.
     */
    new(init: IErrorResponse): void;
    toJSON(): IErrorResponse;
    static isErrorResponse(input: unknown): boolean;
}
//# sourceMappingURL=ErrorResponse.d.ts.map