UNPKG

328 BTypeScriptView Raw
1/**
2 * Used to throw HTTP errors.
3 * Just do throw new HttpError(code, message) in your controller action and
4 * default error handler will catch it and give in your response given code and message .
5 */
6export declare class HttpError extends Error {
7 httpCode: number;
8 constructor(httpCode: number, message?: string);
9}