export declare enum CustomErrorCodes {
    GENERAL_ERROR = 0,
    MALFORMED_REQUEST = 1,
    INVALID_TOKEN = 2,
    NO_TOKEN_PROVIDED = 3,
    UNKNOWN_USER = 10001,
    UNKNOWN_ENTITY = 10002,
    UNKNOWN_USER_OR_ENTITY = 10003
}
export type APIRequestIssue = {
    code: CustomErrorCodes;
    reason: string;
};
export declare class ApiError extends Error {
    code?: CustomErrorCodes | undefined;
    constructor(message: string, code?: CustomErrorCodes | undefined);
}
export declare function throwApiError(res: Response): Promise<never>;
