nestjs-exception-handler 4.0.0 → 4.2.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,75 +1,72 @@
1
- {
2
- "name": "nestjs-exception-handler",
3
- "version": "4.0.0",
4
- "description": "A comprehensive global exception filter for NestJS that handles all common NestJS, Prisma, and Node.js exceptions with formatted error responses.",
5
- "main": "dist/index.js",
6
- "types": "dist/index.d.ts",
7
- "exports": {
8
- ".": {
9
- "import": "./dist/index.js",
10
- "require": "./dist/index.js",
11
- "types": "./dist/index.d.ts"
12
- }
13
- },
14
- "files": [
15
- "dist",
16
- "README.md"
17
- ],
18
- "scripts": {
19
- "build": "tsc",
20
- "prepublishOnly": "npm run build",
21
- "test": "echo \"No tests specified\" && exit 0"
22
- },
23
- "keywords": [
24
- "nestjs",
25
- "exception",
26
- "filter",
27
- "error",
28
- "handler",
29
- "prisma",
30
- "error-handler",
31
- "exception-filter",
32
- "global-exception-filter",
33
- "nestjs-exception",
34
- "nestjs-error",
35
- "validation",
36
- "class-validator"
37
- ],
38
- "author": "Nurul Islam Rimon <nurulislamrimon@gmail.com>",
39
- "license": "MIT",
40
- "repository": {
41
- "type": "git",
42
- "url": "https://github.com/nurulislamrimon/nestjs-exception-handler.git"
43
- },
44
- "bugs": {
45
- "url": "https://github.com/nurulislamrimon/nestjs-exception-handler/issues"
46
- },
47
- "homepage": "https://github.com/nurulislamrimon/nestjs-exception-handler#readme",
48
- "engines": {
49
- "node": ">=16"
50
- },
51
- "peerDependencies": {
52
- "@nestjs/common": "^10.0.0",
53
- "@nestjs/core": "^10.0.0",
54
- "@prisma/client": ">=4.0.0"
55
- },
56
- "peerDependenciesMeta": {
57
- "@nestjs/common": {
58
- "optional": true
59
- },
60
- "@nestjs/core": {
61
- "optional": true
62
- },
63
- "@prisma/client": {
64
- "optional": true
65
- }
66
- },
67
- "devDependencies": {
68
- "@nestjs/common": "^10.0.0",
69
- "@nestjs/core": "^10.0.0",
70
- "@prisma/client": "^6.9.0",
71
- "@types/express": "^5.0.0",
72
- "@types/node": "^24.0.2",
73
- "typescript": "^5.8.3"
74
- }
75
- }
1
+ {
2
+ "name": "nestjs-exception-handler",
3
+ "version": "4.2.0",
4
+ "description": "A production-grade global exception handling system for NestJS applications",
5
+ "main": "dist/index.js",
6
+ "module": "dist/index.mjs",
7
+ "types": "dist/index.d.ts",
8
+ "exports": {
9
+ ".": {
10
+ "import": "./dist/index.mjs",
11
+ "require": "./dist/index.js",
12
+ "types": "./dist/index.d.ts"
13
+ }
14
+ },
15
+ "files": [
16
+ "dist"
17
+ ],
18
+ "scripts": {
19
+ "build": "tsup",
20
+ "lint": "eslint src --ext .ts",
21
+ "format": "prettier --write \"src/**/*.ts\"",
22
+ "test": "jest",
23
+ "test:watch": "jest --watch",
24
+ "test:cov": "jest --coverage",
25
+ "prepublishOnly": "npm run build"
26
+ },
27
+ "keywords": [
28
+ "nestjs",
29
+ "exception",
30
+ "handler",
31
+ "filter",
32
+ "error",
33
+ "prisma",
34
+ "validation"
35
+ ],
36
+ "author": "Nurul Islam Rimon",
37
+ "license": "MIT",
38
+ "repository": {
39
+ "type": "git",
40
+ "url": "https://github.com/nurulislamrimon/nestjs-exception-handler.git"
41
+ },
42
+ "peerDependencies": {
43
+ "@nestjs/common": "^10.0.0",
44
+ "@nestjs/core": "^10.0.0",
45
+ "@prisma/client": "^5.0.0 || ^7.0.0",
46
+ "reflect-metadata": "^0.1.13",
47
+ "rxjs": "^7.8.0"
48
+ },
49
+ "devDependencies": {
50
+ "@nestjs/common": "^10.0.0",
51
+ "@nestjs/core": "^10.0.0",
52
+ "@nestjs/testing": "^10.4.22",
53
+ "@prisma/client": "^5.0.0",
54
+ "@types/express": "^4.17.17",
55
+ "@types/jest": "^29.5.0",
56
+ "@types/node": "^20.0.0",
57
+ "@typescript-eslint/eslint-plugin": "^6.0.0",
58
+ "@typescript-eslint/parser": "^6.0.0",
59
+ "eslint": "^8.0.0",
60
+ "eslint-config-prettier": "^10.1.8",
61
+ "eslint-plugin-prettier": "^5.5.5",
62
+ "jest": "^29.5.0",
63
+ "prettier": "^3.0.0",
64
+ "reflect-metadata": "^0.1.13",
65
+ "rxjs": "^7.8.0",
66
+ "ts-jest": "^29.1.0",
67
+ "ts-node": "^10.9.2",
68
+ "tsup": "^7.0.0",
69
+ "typescript": "^5.0.0"
70
+ },
71
+ "dependencies": {}
72
+ }
@@ -1,4 +0,0 @@
1
- export { formatKnownError } from "./known";
2
- export { formatValidationError } from "./validation";
3
- export { formatInitializationError } from "./initialization";
4
- export { formatUnknownError } from "./unknown";
@@ -1,11 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.formatUnknownError = exports.formatInitializationError = exports.formatValidationError = exports.formatKnownError = void 0;
4
- var known_1 = require("./known");
5
- Object.defineProperty(exports, "formatKnownError", { enumerable: true, get: function () { return known_1.formatKnownError; } });
6
- var validation_1 = require("./validation");
7
- Object.defineProperty(exports, "formatValidationError", { enumerable: true, get: function () { return validation_1.formatValidationError; } });
8
- var initialization_1 = require("./initialization");
9
- Object.defineProperty(exports, "formatInitializationError", { enumerable: true, get: function () { return initialization_1.formatInitializationError; } });
10
- var unknown_1 = require("./unknown");
11
- Object.defineProperty(exports, "formatUnknownError", { enumerable: true, get: function () { return unknown_1.formatUnknownError; } });
@@ -1,3 +0,0 @@
1
- import { PrismaClientInitializationError } from "@prisma/client/runtime/library";
2
- import { ErrorMessage } from "../formatter";
3
- export declare function formatInitializationError(_exception: PrismaClientInitializationError): ErrorMessage[];
@@ -1,11 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.formatInitializationError = formatInitializationError;
4
- function formatInitializationError(_exception) {
5
- return [
6
- {
7
- path: "database",
8
- message: "Failed to connect to the database.",
9
- },
10
- ];
11
- }
@@ -1,3 +0,0 @@
1
- import { PrismaClientKnownRequestError } from "@prisma/client/runtime/library";
2
- import { ErrorMessage } from "../formatter";
3
- export declare function formatKnownError(exception: PrismaClientKnownRequestError): ErrorMessage[];
@@ -1,43 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.formatKnownError = formatKnownError;
4
- function formatKnownError(exception) {
5
- var _a, _b, _c, _d, _e, _f, _g, _h;
6
- const messages = [];
7
- switch (exception.code) {
8
- case "P2002":
9
- const target = Array.isArray((_a = exception.meta) === null || _a === void 0 ? void 0 : _a.target)
10
- ? (_b = exception.meta) === null || _b === void 0 ? void 0 : _b.target[0]
11
- : "unknown_field";
12
- messages.push({
13
- path: target,
14
- message: `A record with this ${target} already exists.`,
15
- });
16
- break;
17
- case "P2003":
18
- messages.push({
19
- path: ((_c = exception.meta) === null || _c === void 0 ? void 0 : _c.field_name) || "unknown_relation",
20
- message: `Invalid reference: ${(_d = exception.meta) === null || _d === void 0 ? void 0 : _d.field_name}.`,
21
- });
22
- break;
23
- case "P2005":
24
- case "P2006":
25
- messages.push({
26
- path: ((_e = exception.meta) === null || _e === void 0 ? void 0 : _e.field_name) || "unknown_field",
27
- message: `Invalid value for ${(_f = exception.meta) === null || _f === void 0 ? void 0 : _f.field_name}.`,
28
- });
29
- break;
30
- case "P2025":
31
- messages.push({
32
- path: ((_g = exception.meta) === null || _g === void 0 ? void 0 : _g.model_name) || "resource",
33
- message: `The requested ${(_h = exception.meta) === null || _h === void 0 ? void 0 : _h.model_name} does not exist.`,
34
- });
35
- break;
36
- default:
37
- messages.push({
38
- path: "unknown_error",
39
- message: exception.message || "Unknown Prisma error.",
40
- });
41
- }
42
- return messages;
43
- }
@@ -1,2 +0,0 @@
1
- import { ErrorMessage } from "../formatter";
2
- export declare function formatUnknownError(exception: any): ErrorMessage[];
@@ -1,14 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.formatUnknownError = formatUnknownError;
4
- function formatUnknownError(exception) {
5
- const path = typeof (exception === null || exception === void 0 ? void 0 : exception.name) === "string"
6
- ? exception.name.toLowerCase()
7
- : "internal";
8
- return [
9
- {
10
- path,
11
- message: (exception === null || exception === void 0 ? void 0 : exception.message) || "An unexpected error occurred.",
12
- },
13
- ];
14
- }
@@ -1,3 +0,0 @@
1
- import { PrismaClientValidationError, PrismaClientRustPanicError } from "@prisma/client/runtime/library";
2
- import { ErrorMessage } from "../formatter";
3
- export declare function formatValidationError(exception: PrismaClientValidationError | PrismaClientRustPanicError): ErrorMessage[];
@@ -1,15 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.formatValidationError = formatValidationError;
4
- function formatValidationError(exception) {
5
- var _a;
6
- const raw = exception.message || "Invalid query or DB error.";
7
- const match = raw.match(/Argument `(\w+)` is missing/);
8
- const field = (_a = match === null || match === void 0 ? void 0 : match[1]) !== null && _a !== void 0 ? _a : "query";
9
- return [
10
- {
11
- path: field,
12
- message: match ? `Argument \`${field}\` is missing.` : raw,
13
- },
14
- ];
15
- }
@@ -1,24 +0,0 @@
1
- import { PrismaClientKnownRequestError, PrismaClientValidationError, PrismaClientInitializationError, PrismaClientRustPanicError } from "@prisma/client/runtime/library";
2
- export interface ErrorMessage {
3
- path: string;
4
- message: string;
5
- }
6
- export type FormatFunction = (info: {
7
- type: "known" | "validation" | "initialization" | "panic" | "unknown";
8
- error: any;
9
- default: ErrorMessage[];
10
- }) => any[];
11
- interface FormatterOptions {
12
- format?: FormatFunction;
13
- }
14
- export declare class PrismaExceptionFormatter {
15
- private readonly customFormat?;
16
- constructor(options?: FormatterOptions);
17
- private applyFormat;
18
- formatPrismaError(exception: PrismaClientKnownRequestError): any[];
19
- formatQueryError(exception: PrismaClientValidationError | PrismaClientRustPanicError): any[];
20
- formatInitializationError(exception: PrismaClientInitializationError): any[];
21
- formatUnknownError(exception: any): any[];
22
- formatError(exception: any): any[];
23
- }
24
- export {};
package/dist/formatter.js DELETED
@@ -1,47 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.PrismaExceptionFormatter = void 0;
4
- const library_1 = require("@prisma/client/runtime/library");
5
- const default_formatters_1 = require("./default-formatters");
6
- class PrismaExceptionFormatter {
7
- constructor(options) {
8
- this.customFormat = options === null || options === void 0 ? void 0 : options.format;
9
- }
10
- applyFormat(type, error, defaults) {
11
- return this.customFormat
12
- ? this.customFormat({ type, error, default: defaults })
13
- : defaults;
14
- }
15
- formatPrismaError(exception) {
16
- const defaults = (0, default_formatters_1.formatKnownError)(exception);
17
- return this.applyFormat("known", exception, defaults);
18
- }
19
- formatQueryError(exception) {
20
- const defaults = (0, default_formatters_1.formatValidationError)(exception);
21
- return this.applyFormat("validation", exception, defaults);
22
- }
23
- formatInitializationError(exception) {
24
- const defaults = (0, default_formatters_1.formatInitializationError)(exception);
25
- return this.applyFormat("initialization", exception, defaults);
26
- }
27
- formatUnknownError(exception) {
28
- const defaults = (0, default_formatters_1.formatUnknownError)(exception);
29
- return this.applyFormat("unknown", exception, defaults);
30
- }
31
- formatError(exception) {
32
- if (exception instanceof library_1.PrismaClientKnownRequestError) {
33
- return this.formatPrismaError(exception);
34
- }
35
- else if (exception instanceof library_1.PrismaClientValidationError ||
36
- exception instanceof library_1.PrismaClientRustPanicError) {
37
- return this.formatQueryError(exception);
38
- }
39
- else if (exception instanceof library_1.PrismaClientInitializationError) {
40
- return this.formatInitializationError(exception);
41
- }
42
- else {
43
- return this.formatUnknownError(exception);
44
- }
45
- }
46
- }
47
- exports.PrismaExceptionFormatter = PrismaExceptionFormatter;
@@ -1,23 +0,0 @@
1
- import { ExceptionFilter, ArgumentsHost } from "@nestjs/common";
2
- export interface ErrorResponse {
3
- success: boolean;
4
- message: string;
5
- errorMessages: Array<{
6
- path: string;
7
- message: string;
8
- }>;
9
- }
10
- export declare class GlobalExceptionFilter implements ExceptionFilter {
11
- private readonly logger;
12
- catch(exception: unknown, host: ArgumentsHost): void;
13
- private formatException;
14
- private formatHttpException;
15
- private formatPrismaException;
16
- private formatValidationException;
17
- private formatGenericError;
18
- private isPrismaError;
19
- private isValidationError;
20
- private getStatus;
21
- private getDefaultMessageForStatus;
22
- private logException;
23
- }
@@ -1,249 +0,0 @@
1
- "use strict";
2
- var __esDecorate = (this && this.__esDecorate) || function (ctor, descriptorIn, decorators, contextIn, initializers, extraInitializers) {
3
- function accept(f) { if (f !== void 0 && typeof f !== "function") throw new TypeError("Function expected"); return f; }
4
- var kind = contextIn.kind, key = kind === "getter" ? "get" : kind === "setter" ? "set" : "value";
5
- var target = !descriptorIn && ctor ? contextIn["static"] ? ctor : ctor.prototype : null;
6
- var descriptor = descriptorIn || (target ? Object.getOwnPropertyDescriptor(target, contextIn.name) : {});
7
- var _, done = false;
8
- for (var i = decorators.length - 1; i >= 0; i--) {
9
- var context = {};
10
- for (var p in contextIn) context[p] = p === "access" ? {} : contextIn[p];
11
- for (var p in contextIn.access) context.access[p] = contextIn.access[p];
12
- context.addInitializer = function (f) { if (done) throw new TypeError("Cannot add initializers after decoration has completed"); extraInitializers.push(accept(f || null)); };
13
- var result = (0, decorators[i])(kind === "accessor" ? { get: descriptor.get, set: descriptor.set } : descriptor[key], context);
14
- if (kind === "accessor") {
15
- if (result === void 0) continue;
16
- if (result === null || typeof result !== "object") throw new TypeError("Object expected");
17
- if (_ = accept(result.get)) descriptor.get = _;
18
- if (_ = accept(result.set)) descriptor.set = _;
19
- if (_ = accept(result.init)) initializers.unshift(_);
20
- }
21
- else if (_ = accept(result)) {
22
- if (kind === "field") initializers.unshift(_);
23
- else descriptor[key] = _;
24
- }
25
- }
26
- if (target) Object.defineProperty(target, contextIn.name, descriptor);
27
- done = true;
28
- };
29
- var __runInitializers = (this && this.__runInitializers) || function (thisArg, initializers, value) {
30
- var useValue = arguments.length > 2;
31
- for (var i = 0; i < initializers.length; i++) {
32
- value = useValue ? initializers[i].call(thisArg, value) : initializers[i].call(thisArg);
33
- }
34
- return useValue ? value : void 0;
35
- };
36
- var __setFunctionName = (this && this.__setFunctionName) || function (f, name, prefix) {
37
- if (typeof name === "symbol") name = name.description ? "[".concat(name.description, "]") : "";
38
- return Object.defineProperty(f, "name", { configurable: true, value: prefix ? "".concat(prefix, " ", name) : name });
39
- };
40
- Object.defineProperty(exports, "__esModule", { value: true });
41
- exports.GlobalExceptionFilter = void 0;
42
- const common_1 = require("@nestjs/common");
43
- const library_1 = require("@prisma/client/runtime/library");
44
- const parse_http_exception_1 = require("./helpers/parse-http-exception");
45
- const parse_prisma_errors_1 = require("./helpers/parse-prisma-errors");
46
- const parse_validation_errors_1 = require("./helpers/parse-validation-errors");
47
- let GlobalExceptionFilter = (() => {
48
- let _classDecorators = [(0, common_1.Catch)()];
49
- let _classDescriptor;
50
- let _classExtraInitializers = [];
51
- let _classThis;
52
- var GlobalExceptionFilter = _classThis = class {
53
- constructor() {
54
- this.logger = new common_1.Logger(GlobalExceptionFilter.name);
55
- }
56
- catch(exception, host) {
57
- const ctx = host.switchToHttp();
58
- const response = ctx.getResponse();
59
- const request = ctx.getRequest();
60
- const errorResponse = this.formatException(exception);
61
- this.logException(exception, request);
62
- const status = this.getStatus(exception);
63
- response.status(status).json(errorResponse);
64
- }
65
- formatException(exception) {
66
- if (exception instanceof common_1.HttpException) {
67
- return this.formatHttpException(exception);
68
- }
69
- if (this.isPrismaError(exception)) {
70
- return this.formatPrismaException(exception);
71
- }
72
- if (this.isValidationError(exception)) {
73
- return this.formatValidationException(exception);
74
- }
75
- return this.formatGenericError(exception);
76
- }
77
- formatHttpException(exception) {
78
- const parsed = (0, parse_http_exception_1.parseHttpException)(exception);
79
- const status = exception.getStatus();
80
- const response = exception.getResponse();
81
- let message;
82
- if (typeof response === "object" && response !== null) {
83
- const res = response;
84
- message = typeof res.error === "string"
85
- ? res.error
86
- : this.getDefaultMessageForStatus(status);
87
- }
88
- else {
89
- message = exception.message || this.getDefaultMessageForStatus(status);
90
- }
91
- return {
92
- success: false,
93
- message,
94
- errorMessages: parsed,
95
- };
96
- }
97
- formatPrismaException(exception) {
98
- if (exception instanceof library_1.PrismaClientKnownRequestError ||
99
- exception instanceof library_1.PrismaClientValidationError ||
100
- exception instanceof library_1.PrismaClientInitializationError) {
101
- const parsed = (0, parse_prisma_errors_1.parsePrismaError)(exception);
102
- let message;
103
- if (exception instanceof library_1.PrismaClientKnownRequestError) {
104
- switch (exception.code) {
105
- case "P2002":
106
- message = "Unique constraint failed";
107
- break;
108
- case "P2025":
109
- message = "Record not found";
110
- break;
111
- default:
112
- message = "Database error occurred";
113
- }
114
- }
115
- else if (exception instanceof library_1.PrismaClientValidationError) {
116
- message = "Invalid data provided";
117
- }
118
- else {
119
- message = "Database connection failed";
120
- }
121
- return {
122
- success: false,
123
- message,
124
- errorMessages: parsed.length > 0 ? parsed : [{ path: "database", message }],
125
- };
126
- }
127
- return {
128
- success: false,
129
- message: "Database error occurred",
130
- errorMessages: [{ path: "database", message: "Database error occurred" }],
131
- };
132
- }
133
- formatValidationException(exception) {
134
- const response = exception.getResponse();
135
- const messages = [];
136
- if (typeof response === "object" && response !== null) {
137
- const res = response;
138
- if (Array.isArray(res.message)) {
139
- const validationErrors = res.message;
140
- for (const error of validationErrors) {
141
- if (typeof error === "object" && error !== null) {
142
- const errorObj = error;
143
- if (errorObj.errors && Array.isArray(errorObj.errors)) {
144
- const parsed = (0, parse_validation_errors_1.parseValidationErrors)(errorObj.errors);
145
- messages.push(...parsed);
146
- }
147
- }
148
- }
149
- }
150
- }
151
- if (messages.length === 0) {
152
- messages.push({ path: "validation", message: "Validation failed" });
153
- }
154
- return {
155
- success: false,
156
- message: "Validation failed",
157
- errorMessages: messages,
158
- };
159
- }
160
- formatGenericError(exception) {
161
- if (exception instanceof Error) {
162
- return {
163
- success: false,
164
- message: exception.message || "Internal server error",
165
- errorMessages: [
166
- {
167
- path: "server",
168
- message: exception.message || "Internal server error",
169
- },
170
- ],
171
- };
172
- }
173
- return {
174
- success: false,
175
- message: "Internal server error",
176
- errorMessages: [
177
- {
178
- path: "server",
179
- message: "Internal server error",
180
- },
181
- ],
182
- };
183
- }
184
- isPrismaError(exception) {
185
- return (exception instanceof library_1.PrismaClientKnownRequestError ||
186
- exception instanceof library_1.PrismaClientValidationError ||
187
- exception instanceof library_1.PrismaClientInitializationError);
188
- }
189
- isValidationError(exception) {
190
- if (!(exception instanceof common_1.HttpException))
191
- return false;
192
- const response = exception.getResponse();
193
- if (typeof response !== "object" || response === null)
194
- return false;
195
- const res = response;
196
- return (exception.getStatus() === common_1.HttpStatus.BAD_REQUEST &&
197
- Array.isArray(res.message));
198
- }
199
- getStatus(exception) {
200
- if (exception instanceof common_1.HttpException) {
201
- return exception.getStatus();
202
- }
203
- if (this.isPrismaError(exception)) {
204
- return common_1.HttpStatus.BAD_REQUEST;
205
- }
206
- if (this.isValidationError(exception)) {
207
- return common_1.HttpStatus.BAD_REQUEST;
208
- }
209
- return common_1.HttpStatus.INTERNAL_SERVER_ERROR;
210
- }
211
- getDefaultMessageForStatus(status) {
212
- switch (status) {
213
- case common_1.HttpStatus.BAD_REQUEST:
214
- return "Bad request";
215
- case common_1.HttpStatus.UNAUTHORIZED:
216
- return "Unauthorized";
217
- case common_1.HttpStatus.FORBIDDEN:
218
- return "Forbidden";
219
- case common_1.HttpStatus.NOT_FOUND:
220
- return "Resource not found";
221
- case common_1.HttpStatus.CONFLICT:
222
- return "Conflict";
223
- default:
224
- return "Internal server error";
225
- }
226
- }
227
- logException(exception, request) {
228
- const method = request.method;
229
- const url = request.url;
230
- const ip = request.ip || request.headers["x-forwarded-for"] || "unknown";
231
- if (exception instanceof Error) {
232
- this.logger.error(`${method} ${url} - ${ip} - ${exception.message}`, exception.stack);
233
- }
234
- else {
235
- this.logger.error(`${method} ${url} - ${ip} - ${JSON.stringify(exception)}`);
236
- }
237
- }
238
- };
239
- __setFunctionName(_classThis, "GlobalExceptionFilter");
240
- (() => {
241
- const _metadata = typeof Symbol === "function" && Symbol.metadata ? Object.create(null) : void 0;
242
- __esDecorate(null, _classDescriptor = { value: _classThis }, _classDecorators, { kind: "class", name: _classThis.name, metadata: _metadata }, null, _classExtraInitializers);
243
- GlobalExceptionFilter = _classThis = _classDescriptor.value;
244
- if (_metadata) Object.defineProperty(_classThis, Symbol.metadata, { enumerable: true, configurable: true, writable: true, value: _metadata });
245
- __runInitializers(_classThis, _classExtraInitializers);
246
- })();
247
- return GlobalExceptionFilter = _classThis;
248
- })();
249
- exports.GlobalExceptionFilter = GlobalExceptionFilter;
@@ -1,3 +0,0 @@
1
- export * from "./parse-validation-errors";
2
- export * from "./parse-prisma-errors";
3
- export * from "./parse-http-exception";
@@ -1,19 +0,0 @@
1
- "use strict";
2
- var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
- if (k2 === undefined) k2 = k;
4
- var desc = Object.getOwnPropertyDescriptor(m, k);
5
- if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
- desc = { enumerable: true, get: function() { return m[k]; } };
7
- }
8
- Object.defineProperty(o, k2, desc);
9
- }) : (function(o, m, k, k2) {
10
- if (k2 === undefined) k2 = k;
11
- o[k2] = m[k];
12
- }));
13
- var __exportStar = (this && this.__exportStar) || function(m, exports) {
14
- for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
15
- };
16
- Object.defineProperty(exports, "__esModule", { value: true });
17
- __exportStar(require("./parse-validation-errors"), exports);
18
- __exportStar(require("./parse-prisma-errors"), exports);
19
- __exportStar(require("./parse-http-exception"), exports);