import { Response } from './response'; /** * The base error class. Implements a standard Javascript Error object that * can be sent as an HTTP response. * * @export * @class HTTPError * @extends {Error} */ export declare class HTTPError extends Error { /** * The status code of the response. * * @memberof HTTPError */ code: number; /** * The message associated with the response code. * * @memberof HTTPError */ message: string; /** * Creates an instance of HTTPError. * @param {number} [code] * @param {string} [message] * @memberof HTTPError */ constructor(code?: number, message?: string); /** * Returns a response object suitable for serverless. * * @returns {Response} * @memberof HTTPError */ toResponse(res?: Response): Response; } /** * An implementation of a Bad Request error. * * @export * @class BadRequest * @extends {HTTPError} */ export declare class BadRequest extends HTTPError { constructor(message?: string); } /** * An implementation of an Unauthorized error. * * @export * @class Unauthorized * @extends {HTTPError} */ export declare class Unauthorized extends HTTPError { constructor(message?: string); } /** * An implementation of a Forbidden error. * * @export * @class Forbidden * @extends {HTTPError} */ export declare class Forbidden extends HTTPError { constructor(message?: string); } /** * An implementation of a Not Found error. * * @export * @class NotFound * @extends {HTTPError} */ export declare class NotFound extends HTTPError { constructor(message?: string); } /** * An implementation of a Method Not Allowed error. * * @export * @class MethodNotAllowed * @extends {HTTPError} */ export declare class MethodNotAllowed extends HTTPError { constructor(message?: string); } /** * An implementation of an Internal Error error. * * @export * @class InternalError * @extends {HTTPError} */ export declare class InternalError extends HTTPError { constructor(message?: string); }