1 export class HttpError extends Error {
4 constructor(msg: string, statusCode: number, errorCode: string) {
6 this.statusCode = statusCode;
7 this.errorCode = errorCode;
11 export class ForbiddenError extends HttpError {
12 constructor(msg: string = 'Forbidden') {
13 super(msg, 401, 'forbidden');
17 export class BadInputError extends HttpError {
18 constructor(msg: string = 'Bad Input') {
19 super(msg, 400, 'bad_input');
23 export class NotFoundError extends HttpError {
24 constructor(msg: string = 'Not Found') {
25 super(msg, 404, 'missing');