@anatine/zod-nestjs
Version:
Zod helper methods for NestJS
28 lines • 1.88 kB
JavaScript
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.HTTP_ERRORS_BY_CODE = void 0;
const common_1 = require("@nestjs/common");
// This is the same list of HTTP errors as used by the NestJS ValidationPipe.
// https://github.com/nestjs/nest/blob/85b0dc84953802d33ae8753df02adb84d6d0f0e8/packages/common/utils/http-error-by-code.util.ts#L46
exports.HTTP_ERRORS_BY_CODE = {
[]: common_1.BadGatewayException,
[]: common_1.BadRequestException,
[]: common_1.ConflictException,
[]: common_1.ForbiddenException,
[]: common_1.GatewayTimeoutException,
[]: common_1.GoneException,
[]: common_1.ImATeapotException,
[]: common_1.InternalServerErrorException,
[]: common_1.MethodNotAllowedException,
[]: common_1.NotAcceptableException,
[]: common_1.NotFoundException,
[]: common_1.NotImplementedException,
[]: common_1.PayloadTooLargeException,
[]: common_1.PreconditionFailedException,
[]: common_1.RequestTimeoutException,
[]: common_1.ServiceUnavailableException,
[]: common_1.UnauthorizedException,
[]: common_1.UnprocessableEntityException,
[]: common_1.UnsupportedMediaTypeException,
};
//# sourceMappingURL=http-errors.js.map