UNPKG

neura-express-app

Version:

Basic express application starter with some common utilities.

47 lines (46 loc) 1.55 kB
import { ValidationError } from "class-validator"; export declare class NeuraAPIError extends Error { status: number; message: string; constructor(status: number, message: string); } export declare class NotFoundError extends NeuraAPIError { constructor(message?: string); } export declare class BadRequestError extends NeuraAPIError { constructor(message?: string); } export declare class AccessDeniedError extends NeuraAPIError { constructor(message?: string); } export declare class UnauthorizedError extends NeuraAPIError { constructor(message?: string); } export declare class ForbiddenError extends NeuraAPIError { constructor(message?: string); } export declare class MethodNotAllowedError extends NeuraAPIError { constructor(message?: string); } export declare class ConflictError extends NeuraAPIError { constructor(message?: string); } export declare class UnSupportedMediaTypeError extends NeuraAPIError { constructor(message?: string); } export declare class UnProcessableEntityError extends NeuraAPIError { constructor(message?: string); } export declare class TooManyRequestsError extends NeuraAPIError { constructor(message?: string); } export declare class InternalServerError extends NeuraAPIError { constructor(message?: string); } export declare class ValidationRequestError extends NeuraAPIError { data: { [key: string]: string[]; }; constructor(message: string | undefined, errors: ValidationError[]); addError(key: string, msg: string): void; }