shelving
Version:
Toolkit for using data in JavaScript.
28 lines (27 loc) • 1.36 kB
TypeScript
import { BaseError, type BaseErrorOptions } from "./BaseError.js";
/** Error thrown when a request isn't well-formed. */
export declare class RequestError extends BaseError {
/** The corresponding HTTP status code for this error, in the range `400-499` */
readonly code: number;
constructor(message?: string, options?: BaseErrorOptions);
}
/** Thrown if an operation failed because the user is not logged in, or the login information is not well-formed. */
export declare class UnauthorizedError extends RequestError {
readonly code: number;
constructor(message?: string, options?: BaseErrorOptions);
}
/** Thrown if the requested content is not found. */
export declare class NotFoundError extends RequestError {
readonly code: number;
constructor(message?: string, options?: BaseErrorOptions);
}
/** Error thrown when a request is is valid and well-formed, but its actual data is not. */
export declare class UnprocessableError extends RequestError {
readonly code: number;
constructor(message?: string, options?: BaseErrorOptions);
}
/** Thrown if an operation failed because the user is logged in, but does not have sufficient privileges to access this content. */
export declare class ForbiddenError extends RequestError {
readonly code: number;
constructor(message?: string, options?: BaseErrorOptions);
}