UNPKG

1.72 kBJavaScriptView Raw
1"use strict";
2Object.defineProperty(exports, "__esModule", { value: true });
3exports.HttpErrorByCode = void 0;
4const enums_1 = require("../enums");
5const exceptions_1 = require("../exceptions");
6exports.HttpErrorByCode = {
7 [enums_1.HttpStatus.BAD_GATEWAY]: exceptions_1.BadGatewayException,
8 [enums_1.HttpStatus.BAD_REQUEST]: exceptions_1.BadRequestException,
9 [enums_1.HttpStatus.CONFLICT]: exceptions_1.ConflictException,
10 [enums_1.HttpStatus.FORBIDDEN]: exceptions_1.ForbiddenException,
11 [enums_1.HttpStatus.GATEWAY_TIMEOUT]: exceptions_1.GatewayTimeoutException,
12 [enums_1.HttpStatus.GONE]: exceptions_1.GoneException,
13 [enums_1.HttpStatus.I_AM_A_TEAPOT]: exceptions_1.ImATeapotException,
14 [enums_1.HttpStatus.INTERNAL_SERVER_ERROR]: exceptions_1.InternalServerErrorException,
15 [enums_1.HttpStatus.METHOD_NOT_ALLOWED]: exceptions_1.MethodNotAllowedException,
16 [enums_1.HttpStatus.NOT_ACCEPTABLE]: exceptions_1.NotAcceptableException,
17 [enums_1.HttpStatus.NOT_FOUND]: exceptions_1.NotFoundException,
18 [enums_1.HttpStatus.NOT_IMPLEMENTED]: exceptions_1.NotImplementedException,
19 [enums_1.HttpStatus.PAYLOAD_TOO_LARGE]: exceptions_1.PayloadTooLargeException,
20 [enums_1.HttpStatus.PRECONDITION_FAILED]: exceptions_1.PreconditionFailedException,
21 [enums_1.HttpStatus.REQUEST_TIMEOUT]: exceptions_1.RequestTimeoutException,
22 [enums_1.HttpStatus.SERVICE_UNAVAILABLE]: exceptions_1.ServiceUnavailableException,
23 [enums_1.HttpStatus.UNAUTHORIZED]: exceptions_1.UnauthorizedException,
24 [enums_1.HttpStatus.UNPROCESSABLE_ENTITY]: exceptions_1.UnprocessableEntityException,
25 [enums_1.HttpStatus.UNSUPPORTED_MEDIA_TYPE]: exceptions_1.UnsupportedMediaTypeException,
26};