{"_id":"@buildery/nest-exception-handling","_rev":"6-0ec95a84bd5cb1f1ca5f14d4ece6d495","name":"@buildery/nest-exception-handling","dist-tags":{"latest":"1.0.5"},"versions":{"1.0.0":{"name":"@buildery/nest-exception-handling","version":"1.0.0","keywords":["nestjs","exception","exception-handling"],"author":{"name":"asemin"},"license":"ISC","_id":"@buildery/nest-exception-handling@1.0.0","maintainers":[{"name":"anton.semin","email":"semin240@gmail.com"}],"homepage":"https://github.com/AntonSeminski/nest-exception-handling#readme","bugs":{"url":"https://github.com/AntonSeminski/nest-exception-handling/issues"},"dist":{"shasum":"4b69b17aa0df776af3b341315c5e05e38ca63562","tarball":"https://registry.npmjs.org/@buildery/nest-exception-handling/-/nest-exception-handling-1.0.0.tgz","fileCount":104,"integrity":"sha512-hkUNP+yy3AZ6ahEnINfbBXuFY14QHPBkfgwg0k0O01/2qBvpu1Mm1I36HO98D7TsTcEQulFy/MJN1A6i3zqFfA==","signatures":[{"sig":"MEUCIF15zYWy307VIcJ3E6Hl2crnbCVRFCBB+wfM8cmG532xAiEA2gtAR0DV+AohfxokchdMq+dCe2fJN9WdzeNzKFLaNJw=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":135377,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJjRvx7ACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmpbQQ/+Mt7l6juZoyM+TtwBjrpqGlP5bG3jPzMS9yK5j2j/HXc6GbbF\r\nMEYReoxr6hk+OTNBvJmsa4gOaE8xUbfbyH+woCQw+Dx1HW/40UcTsuFLjrRJ\r\n87cYJwvgkOfr4bVIJSf2qD77FrckzBwAHxXUkGCSGP8emW/hLCUNRWXQwDJ0\r\nTQ80HbRQ9aGRJOoyOh4/4OdG1zqpxhSkU73vnq3HqSU/I/1XS6cSI224FEH4\r\naNp8KJxOTgDu22nbkaQ90fwSasvNhzfw4W1H3eil1qQh8QGwfSasYJgf+gzE\r\n3KNguKMSwndeclFPKZk3yNczjmUvxJ5T/pyzVNA+ufSypVlbd/ulcRvcwkwa\r\nW7Re6PgaIEp2/M/uUqfZg5ecy/FrxzYc3U+G7t1lOotuq1pTnRfq5wOnY9iD\r\ncLv2yzqpYv5a+Tkx8O6cD9xYF17QkZWAV4AnAaiB+gTVytAdWg+lLpB2DGJk\r\nYykvZMdX55SVzIop0cRxLpf8BLGbC2SuolqJPZbtiD68WxkC5cYPopoL1gVj\r\nYfLBWc4JXYb3TAX5i3jO8rb9GLcymrIqHPCjoeEJXahXCEwEGcjc4w2imANW\r\nFwgwIorTb8CdSe3UpmuxBsYmaWTCW/rj8lTXrQ4kXC+e3UqRmV2gqjNMh3Kg\r\nQlykcNhZfDbuwBQw5qsPj5BmgpQLaE5jpmI=\r\n=eEMH\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/main.js","private":false,"scripts":{"build":"tsc -p tsconfig.build.json","prepublishOnly":"npm run build"},"_npmUser":{"name":"anton.semin","email":"semin240@gmail.com"},"repository":{"url":"git+https://github.com/AntonSeminski/nest-exception-handling.git","type":"git"},"_npmVersion":"8.19.2","description":"Handling exceptions with filters - NestJS","directories":{},"_nodeVersion":"18.10.0","dependencies":{"fastify":"^4.8.1","typescript":"^4.8.4","@nestjs/common":"^9.1.4","@jira-killer/constants":"^1.0.20"},"publishConfig":{"cache":"cache/.npm","access":"public"},"_hasShrinkwrap":false,"_npmOperationalInternal":{"tmp":"tmp/nest-exception-handling_1.0.0_1665596538902_0.21119637421376591","host":"s3://npm-registry-packages"}},"1.0.1":{"name":"@buildery/nest-exception-handling","version":"1.0.1","keywords":["nestjs","exception","exception-handling"],"author":{"name":"asemin"},"license":"ISC","_id":"@buildery/nest-exception-handling@1.0.1","maintainers":[{"name":"anton.semin","email":"semin240@gmail.com"}],"homepage":"https://github.com/AntonSeminski/nest-exception-handling#readme","bugs":{"url":"https://github.com/AntonSeminski/nest-exception-handling/issues"},"dist":{"shasum":"73a98703ca40d4513e631841c155d889746949f3","tarball":"https://registry.npmjs.org/@buildery/nest-exception-handling/-/nest-exception-handling-1.0.1.tgz","fileCount":106,"integrity":"sha512-qc49xUCSlfAI7qgvqiMpsBNBUwf+s2QayY0gOUZ/Vw/CKr2GQ02OuyyqrnQPiE7Mad9v5YxTOzHCUG6rbOTy8g==","signatures":[{"sig":"MEYCIQDQOzxcNAf8xiX0FqJhARu3cxrbmw0IkAzlwtTIGEg07gIhAP6C9f+MMN1/C+jMYQkQ8I1UkjTcD8mKr4hus7sCoAqe","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":177785,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJjRwnOACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2Vmp+Vg//RAKUe282FhTWyXAy8pkg+IaSUOJbLBef6Ryq9cot/ugnHfhj\r\nRlGITVNW0G03ZeSuUZmQzqBWR4+b2yL3IDssKGctRe23emHxR7vO62JbBBbX\r\n+UiRoxXRWbpMa7+DzX5qR4dY0sPQCxclUNJJb5eAy6SqQYyUGjcYG87IGEGX\r\nNMszIoRwrM3ew8kMIsi9QAPf0efrPD3OV4QF8wruB/CSGNcgDMu004rmyDSp\r\nkNyFOGGEQlfs2MoK3E3HA+d4sxZmAJm/m3phXHy1YNCj/FZDTOA0pOLHpPKT\r\nHDLgTkyGOPcKBP/PPaDRDvxJLj8F4YHgppQCLDVP6RlR1eVZRq7texpaZvea\r\nrnNEyC8nzZZXFqU4Y0LMQhW674zJNM9tAz1Yl/v3jbxQJ1HJE1OTikM29a1I\r\nsYTjICu58+mKM1nG6OPviLBdCBejMA1lFczNFFdiaBbZKwjqYzzI76vX+UnL\r\nII5pchld6C3rw+tjQhfF3k1zrsvTzZqpsiY/SVEEmHnPDT3aaxFCMi+0wzXj\r\nawOaaq3vx1GuHETuAgQBtziJIB6fhsOIdOGdUuAphko0HJhcCLywQrE8oikS\r\nIllezgnqj/RhPOL3hVfHjlJ5SuQ80VAdBQToQRkOdCUglO4UTlAEth0I+95S\r\nfZY5G2CFSemh8QRWHD5keZoWjG9RVB+nYc4=\r\n=u3Ji\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/main.js","private":false,"rootDir":"src","scripts":{"build":"tsc -p tsconfig.build.json","prepublishOnly":"npm run build"},"_npmUser":{"name":"anton.semin","email":"semin240@gmail.com"},"repository":{"url":"git+https://github.com/AntonSeminski/nest-exception-handling.git","type":"git"},"_npmVersion":"8.19.2","description":"Handling exceptions with filters - NestJS","directories":{},"_nodeVersion":"18.10.0","dependencies":{"fastify":"^4.8.1","typescript":"^4.8.4","@nestjs/common":"^9.1.4","@jira-killer/constants":"^1.0.20"},"publishConfig":{"cache":"cache/.npm","access":"public"},"_hasShrinkwrap":false,"_npmOperationalInternal":{"tmp":"tmp/nest-exception-handling_1.0.1_1665599950191_0.4156762056233909","host":"s3://npm-registry-packages"}},"1.0.2":{"name":"@buildery/nest-exception-handling","version":"1.0.2","keywords":["nestjs","exception","exception-handling"],"author":{"name":"asemin"},"license":"ISC","_id":"@buildery/nest-exception-handling@1.0.2","maintainers":[{"name":"anton.semin","email":"semin240@gmail.com"}],"homepage":"https://github.com/AntonSeminski/nest-exception-handling#readme","bugs":{"url":"https://github.com/AntonSeminski/nest-exception-handling/issues"},"dist":{"shasum":"f195cacbbfa4254bfffd49861838237cedab67a2","tarball":"https://registry.npmjs.org/@buildery/nest-exception-handling/-/nest-exception-handling-1.0.2.tgz","fileCount":100,"integrity":"sha512-XsutdheqxTB5MnEDTpypxpRmYzNPLJYf4ZTYAdKahbJJ8CVAjBDvugt20NOQwsWgfooey6hGra7H3PFmWTYMqQ==","signatures":[{"sig":"MEQCIGQSPSLidBVf7cq7V1Co1nz2zZKg8Gqag5nGMNUeULzPAiBVc2wQXGBmo0IxLj1szRr73mBzEgNgxjrXJ+MzKNBL5g==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":133293,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJjRxLHACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmoCBQ/+Ji8BBnqSxkxQQdit2xHJ0ssjGr5TAcCf4510tJNQZjLvnZq/\r\nHuhk9Z4x0hu8ElMjB2Vk/OIHau6V97Ega0MBnllw9mFgEuj3Xp7I55w3CTJm\r\ngMGTQj5tO1cuDLQRzBr7rN0gKb+F0DFtzeP9z4rS1zGi2qmnGEL2uFzG6Tii\r\n8wYuMvG/ANE4V3XT4BmIohUqZBi6ZkWbjuW2tftQtgSGS05xx4ufSQB0VwOD\r\nXJpAm+T9VUTvtMIzHJMnKCCh8qOafb1KbfK/FflfLzeQT46pcHO/51Sjt98Q\r\nURg1jCcduUKRh5Z0P3zhHeXqL2igChqHOu5CDPR9exayfjn45wBSWwf6jIxj\r\nUph5b6q6SycaFreV2CtSUaFU0J26SD7D8U2+aCbnpJS3IWHUSBfMWSfty/0q\r\njj4/9hM4V3mbhQuG1mBzrHXDVVQuAJxXYhHdAsUHAE5XFiJi5/KINg4Ojl5u\r\nbUa5OuknaeGzrjE4Hwv0fpK+7Qf9ELKhei6U5A40HMlffA9M5PtRsSj10i7q\r\nFV7fKL0zxI/RLTEUPHO3WVQG17Bhmeg/en9N79SpM/nBq0cJMu/bgsnyhK8q\r\nQ84kvETlJwKg2YCSCf+hlkRRRlljGsHrfHvqbRWwL7UffVwz1HW8M/sCACdW\r\nXbqVUil9jPLY08J8vGyC1XRNny96O6yTWRM=\r\n=bLZk\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/main.js","types":"./dist/main.d.ts","private":false,"rootDir":"src","scripts":{"build":"tsc -p tsconfig.build.json","prepublishOnly":"npm run build"},"_npmUser":{"name":"anton.semin","email":"semin240@gmail.com"},"repository":{"url":"git+https://github.com/AntonSeminski/nest-exception-handling.git","type":"git"},"_npmVersion":"8.19.2","description":"Handling exceptions with filters - NestJS","directories":{},"_nodeVersion":"18.10.0","dependencies":{"fastify":"^4.8.1","typescript":"^4.8.4","@nestjs/common":"^9.1.4","@jira-killer/constants":"^1.0.20"},"publishConfig":{"cache":"cache/.npm","access":"public"},"_hasShrinkwrap":false,"_npmOperationalInternal":{"tmp":"tmp/nest-exception-handling_1.0.2_1665602247068_0.5390249319022711","host":"s3://npm-registry-packages"}},"1.0.3":{"name":"@buildery/nest-exception-handling","version":"1.0.3","author":{"name":"Anton Semin","email":"anton.siaminski@gmail.com"},"license":"UNLICENSED","_id":"@buildery/nest-exception-handling@1.0.3","maintainers":[{"name":"karpov-dev","email":"uladzimir.karpau@gmail.com"},{"name":"anton.semin","email":"semin240@gmail.com"}],"homepage":"https://github.com/AntonSeminski/NestJS_ExceptionHandling#readme","bugs":{"url":"https://github.com/AntonSeminski/NestJS_ExceptionHandling"},"dist":{"shasum":"1b26b8112da1d576689599188340f869fe34c24f","tarball":"https://registry.npmjs.org/@buildery/nest-exception-handling/-/nest-exception-handling-1.0.3.tgz","fileCount":132,"integrity":"sha512-rbxOjp0M+K3WPkcjFbE3Vk3ppPNt0I+zMnn0g8z9+lftYQK9DIWYRRB8J0z2ytXfwnm3vGf2jJPVdiJw+B1Ktw==","signatures":[{"sig":"MEUCIQCwNGB9aoBIhS2EwT8uAS8+XAEKLWaNFph0jp78nHdJHgIgOYRQWfDiRCBVsP8okFY0ciwXreZlwEi7MlXqe34+CoY=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":65409},"main":"dist/main.js","types":"./dist/main.d.ts","private":false,"rootDir":"src","scripts":{"build":"tsc -p tsconfig.build.json","prepublishOnly":"npm run build"},"_npmUser":{"name":"anton.semin","email":"semin240@gmail.com"},"repository":{"url":"git+https://github.com/AntonSeminski/NestJS_ExceptionHandling.git","type":"git"},"_npmVersion":"9.6.2","description":"<p align=\"center\">   <a href=\"http://nestjs.com/\" target=\"blank\"><img src=\"https://nestjs.com/img/logo_text.svg\" width=\"320\" alt=\"Nest Logo\" /></a> </p>","directories":{},"_nodeVersion":"19.6.1","dependencies":{"fastify":"^4.26.0","mongodb":"^6.3.0","@nestjs/jwt":"^10.1.1","@nestjs/core":"^10.3.1","@nestjs/common":"^10.2.7","@buildery/error-codes":"^1.1.1"},"publishConfig":{"cache":"cache/.npm","access":"public"},"_hasShrinkwrap":false,"devDependencies":{"ts-node":"^10.9.1","prettier":"^3.0.3","ts-loader":"^9.5.0","typescript":"^5.2.2","@nestjs/cli":"^10.2.0","@types/node":"^20.8.7","@types/express":"^4.17.20","tsconfig-paths":"^4.2.0","@nestjs/schematics":"^10.0.2","source-map-support":"^0.5.21"},"_npmOperationalInternal":{"tmp":"tmp/nest-exception-handling_1.0.3_1710686435106_0.9973983082365487","host":"s3://npm-registry-packages"}},"1.0.5":{"name":"@buildery/nest-exception-handling","version":"1.0.5","description":"<p align=\"center\">   <a href=\"http://nestjs.com/\" target=\"blank\"><img src=\"https://nestjs.com/img/logo_text.svg\" width=\"320\" alt=\"Nest Logo\" /></a> </p>","author":{"name":"Anton Semin","email":"anton.siaminski@gmail.com"},"private":false,"license":"UNLICENSED","main":"dist/main.js","scripts":{"prepublishOnly":"npm run build","build":"tsc -p tsconfig.build.json"},"publishConfig":{"cache":"cache/.npm","access":"public"},"repository":{"type":"git","url":"git+https://github.com/Builldery/nest-exception-handling.git"},"bugs":{"url":"https://github.com/Builldery/nest-exception-handling"},"dependencies":{"@buildery/error-codes":"^1.1.7","@nestjs/common":"^11.1.0","@nestjs/jwt":"^11.0.0","@nestjs/core":"^11.1.0","mongodb":"^6.16.0","fastify":"^5.3.2"},"devDependencies":{"@nestjs/cli":"^11.0.7","@nestjs/schematics":"^11.0.5","@types/express":"^5.0.1","@types/node":"^22.15.3","prettier":"^3.5.3","source-map-support":"^0.5.21","ts-loader":"^9.5.2","ts-node":"^10.9.2","tsconfig-paths":"^4.2.0","typescript":"^5.8.3"},"rootDir":"src","types":"./dist/main.d.ts","gitHead":"2769efedb9b631ca4eea2cc72ccdc445e06fc665","homepage":"https://github.com/Builldery/nest-exception-handling#readme","_id":"@buildery/nest-exception-handling@1.0.5","_nodeVersion":"19.6.1","_npmVersion":"9.6.2","dist":{"integrity":"sha512-vbzTZEOmHh6FQ4ODqGsnRnU2YTpfyMkLiHHKf6zzNSj+AhAlypdwH22dgLRDrkAWPn6PtYJC4XAalwKqtgZxyQ==","shasum":"2dbd016300243d1dac945fe8cfd72f533845d181","tarball":"https://registry.npmjs.org/@buildery/nest-exception-handling/-/nest-exception-handling-1.0.5.tgz","fileCount":132,"unpackedSize":65354,"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEUCIE8tgVEQNGZuDvGWXZLSD1SJU8NCKU658grPaDk3FssPAiEAz2NVWRsXlhfn5I0f6x0f42PE5nRzpA/9FBnjX9o5Y7M="}]},"_npmUser":{"name":"anton.semin","email":"semin240@gmail.com"},"directories":{},"maintainers":[{"name":"anton.semin","email":"semin240@gmail.com"},{"name":"karpov-dev","email":"uladzimir.karpau@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/nest-exception-handling_1.0.5_1745933332765_0.385014113187657"},"_hasShrinkwrap":false}},"time":{"created":"2022-10-12T17:42:18.770Z","modified":"2025-04-29T13:28:53.496Z","1.0.0":"2022-10-12T17:42:19.145Z","1.0.1":"2022-10-12T18:39:10.354Z","1.0.2":"2022-10-12T19:17:27.294Z","1.0.3":"2024-03-17T14:40:35.277Z","1.0.5":"2025-04-29T13:28:52.957Z"},"bugs":{"url":"https://github.com/Builldery/nest-exception-handling"},"author":{"name":"Anton Semin","email":"anton.siaminski@gmail.com"},"license":"UNLICENSED","homepage":"https://github.com/Builldery/nest-exception-handling#readme","repository":{"type":"git","url":"git+https://github.com/Builldery/nest-exception-handling.git"},"description":"<p align=\"center\">   <a href=\"http://nestjs.com/\" target=\"blank\"><img src=\"https://nestjs.com/img/logo_text.svg\" width=\"320\" alt=\"Nest Logo\" /></a> </p>","maintainers":[{"name":"anton.semin","email":"semin240@gmail.com"},{"name":"karpov-dev","email":"uladzimir.karpau@gmail.com"}],"readme":"<p align=\"center\">\n  <a href=\"http://nestjs.com/\" target=\"blank\"><img src=\"https://nestjs.com/img/logo_text.svg\" width=\"320\" alt=\"Nest Logo\" /></a>\n</p>\n\n[circleci-image]: https://img.shields.io/circleci/build/github/nestjs/nest/master?token=abc123def456\n[circleci-url]: https://circleci.com/gh/nestjs/nest\n\n  <p align=\"center\">A progressive <a href=\"http://nodejs.org\" target=\"_blank\">Node.js</a> framework for building efficient and scalable server-side applications.</p>\n    <p align=\"center\">\n<a href=\"https://www.npmjs.com/~nestjscore\" target=\"_blank\"><img src=\"https://img.shields.io/npm/v/@nestjs/core.svg\" alt=\"NPM Version\" /></a>\n<a href=\"https://www.npmjs.com/~nestjscore\" target=\"_blank\"><img src=\"https://img.shields.io/npm/l/@nestjs/core.svg\" alt=\"Package License\" /></a>\n<a href=\"https://www.npmjs.com/~nestjscore\" target=\"_blank\"><img src=\"https://img.shields.io/npm/dm/@nestjs/common.svg\" alt=\"NPM Downloads\" /></a>\n<a href=\"https://circleci.com/gh/nestjs/nest\" target=\"_blank\"><img src=\"https://img.shields.io/circleci/build/github/nestjs/nest/master\" alt=\"CircleCI\" /></a>\n<a href=\"https://coveralls.io/github/nestjs/nest?branch=master\" target=\"_blank\"><img src=\"https://coveralls.io/repos/github/nestjs/nest/badge.svg?branch=master#9\" alt=\"Coverage\" /></a>\n<a href=\"https://discord.gg/G7Qnnhy\" target=\"_blank\"><img src=\"https://img.shields.io/badge/discord-online-brightgreen.svg\" alt=\"Discord\"/></a>\n<a href=\"https://opencollective.com/nest#backer\" target=\"_blank\"><img src=\"https://opencollective.com/nest/backers/badge.svg\" alt=\"Backers on Open Collective\" /></a>\n<a href=\"https://opencollective.com/nest#sponsor\" target=\"_blank\"><img src=\"https://opencollective.com/nest/sponsors/badge.svg\" alt=\"Sponsors on Open Collective\" /></a>\n  <a href=\"https://paypal.me/kamilmysliwiec\" target=\"_blank\"><img src=\"https://img.shields.io/badge/Donate-PayPal-ff3f59.svg\"/></a>\n    <a href=\"https://opencollective.com/nest#sponsor\"  target=\"_blank\"><img src=\"https://img.shields.io/badge/Support%20us-Open%20Collective-41B883.svg\" alt=\"Support us\"></a>\n  <a href=\"https://twitter.com/nestframework\" target=\"_blank\"><img src=\"https://img.shields.io/twitter/follow/nestframework.svg?style=social&label=Follow\"></a>\n</p>\n  <!--[![Backers on Open Collective](https://opencollective.com/nest/backers/badge.svg)](https://opencollective.com/nest#backer)\n  [![Sponsors on Open Collective](https://opencollective.com/nest/sponsors/badge.svg)](https://opencollective.com/nest#sponsor)-->\n\n## Description\n\nNestjs Exception handling implementation.\nIncludes: \n    * Handler's chain mechanism\n    * Custom exception to inherit from\n    * Implemented Nest JS Validation Exception handler\n\nException structure: \n```\n    {\n        code: \"ERROR:<ENTITY>-<CODE_MESSAGE>\"\n        status: 500,\n        title: \"Error!\",\n        message: 'This was screwed',\n        body: { any info you like }\n    }\n```\n\n[Nest](https://github.com/nestjs/nest) framework TypeScript starter repository.\n\n## Use\n\n# installation\n```bash\n$ npm install @asemin/nestjs-utils\n```\n\n# Handler creation example\nClass must extend ExceptionHandler and implement `handle` method. Method must return HandlerExceptionDto filled.\n```\nexport class MongoExceptionHandler extends ExceptionHandler{\n    handle(exception: any): HandledExceptionDto {\n        if ( !(exception instanceof MongoError) )\n            return this.next?.handle(exception);\n\n        switch (exception.code) {\n            case 11000:\n                return new HandledExceptionDto(getException(CODES.DATABASE.DUPLICATE));\n        }\n\n        return null;\n    }\n}\n```\n\n# handlers chain creation\nEach member must extend ExceptionHandler\n```\nexport const handlersChain = [\n    new MongoExceptionHandler(),\n    new ValidationExceptionHandler(),\n    new CustomExceptionHandler(),\n    new HttpExceptionHandler()\n];\n```\n\n# Nestjs exception filter configuration. main.ts:\n```bash\n    const exceptionFilter = new ExceptionFilter(\n        <ExceptionHandler>createExceptionHandlersChain(handlersChain)\n    );\n\n    app.useGlobalFilters(exceptionFilter);\n```\n\n## Custom exception use\n\n# throwException\nUse one of the codes. Fill free to put any information to body (second param)\nIf there are no code suitable - throw any exception type manually.\n```\nthrowException(CODES.COMMON.EMPTY_PARAM, {method: 'getByPermissionAndPermissionSets', fields: {permissionId, permissionSetIds}})\n```\n\n# getException info\n```\nconst {code, status, message} = getException(CODES.COMMON.UNKNOWN);\n```","readmeFilename":"README.md"}