export type SupernovaFieldValidationError = {
    key: string;
    message: string | null;
    code: string | null;
};
export type SupernovaBackendError = {
    message: string;
    errorCode?: string;
    label?: string;
    reason?: string;
    code: number;
    requestId: string;
    serverTime: string;
    formErrors?: Array<SupernovaFieldValidationError>;
};
/** Supernova-enhanced error. Contains both machine and user readable information about error */
export declare class SupernovaError extends Error {
    /** Status within 2xx - 5xx range */
    status: number | null;
    /** Machine-processable label error unique to each error message thrown by Supernova backend */
    code: string | null;
    /** Possible form errors that were thrown on POST/PUT requests. Empty when no form failed validation */
    formErrors: Array<SupernovaFieldValidationError>;
    /** Unique ID of the request */
    requestId: string | null;
    /** If error came from the network, it will also contain URL */
    url: string | null;
    /** Time on the server in ISO format */
    serverTime: string | null;
    private constructor();
    /** Creates Supernova error from received but failed network response */
    static fromNetworkResponse(response: SupernovaBackendError, status: number, url: string): SupernovaError;
    /** Creates Supernova error with generic network failure message */
    static fromNoNetworkResponse(url: string): SupernovaError;
    /** Creates Supernova error from local validation failure code */
    static fromCode(code: string): SupernovaError;
    /** Creates Supernova error from generic error message */
    static fromMessage(message: string): SupernovaError;
    /** Checks whether error contains some field validation error */
    isFieldErrored(key: string): boolean;
    /** Retrieves error for a specific field, or null if no error is present for specific field */
    errorForField(key: string): SupernovaFieldValidationError | null;
    /** Returns all important information about the error, ideally suited for logging to console or sentry */
    toString(): string;
    /** Returns error with most important information to show to the users */
    toHumanReadable(): string;
}
