{"versions":{"2.0.0":{"name":"@fastify/error","version":"2.0.0","description":"A small utility, used by Fastify itself, for generating consistent error objects across your codebase and plugins.","main":"index.js","types":"index.d.ts","scripts":{"test":"standard && ava -v && tsd"},"repository":{"type":"git","url":"git+https://github.com/fastify/fastify-error.git"},"keywords":["fastify","error","utility","plugin"],"author":{"name":"Tomas Della Vedova"},"license":"MIT","bugs":{"url":"https://github.com/fastify/fastify-error/issues"},"homepage":"https://github.com/fastify/fastify-error#readme","devDependencies":{"@types/node":"^17.0.0","ava":"^3.9.0","standard":"^17.0.0","tsd":"^0.20.0","typescript":"^4.1.3"},"tsd":{"compilerOptions":{"esModuleInterop":true}},"publishConfig":{"access":"public"},"gitHead":"87121e4ad3c9501bbd153deca36271a5e0520d4e","_id":"@fastify/error@2.0.0","_nodeVersion":"16.15.0","_npmVersion":"8.5.5","dist":{"integrity":"sha512-wI3fpfDT0t7p8E6dA2eTECzzOd+bZsZCJ2Hcv+Onn2b7ZwK3RwD27uW2QDaMtQhAfWQQP+WNK7nKf0twLsBf9w==","shasum":"a9f94af56eb934f0ab1ce4ef9f0ced6ebf2319dc","tarball":"http://123.232.10.234:8212/nexus/content/groups/npm-public/@fastify/error/-/error-2.0.0.tgz","fileCount":9,"unpackedSize":10843,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDztKVfarPFAdYSNaSJO4syjwbq0rqJuw+JbzCFw7fRWQIgRP3bSLfi68SrePrpeX4aGK/qIgfcvf1uEOIbRgg4e4o="}],"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJiaUodACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmoyVw//bRuWug9lHBk4sr7lGnmBiHQ8MmAsORueVHgOpDnU/xfWyVg1\r\nF1XDSMTSvMpPHsUUKrs0/p0H6bUfYmpKnLOFqOtQwUFOgU4NjQHgf9BbuIcU\r\nTdzl5ADSHQz6RpYaCX+pZkbtH4PNAfgeNEw4H+x1Kl8zWdXVAf/xRyWl4goB\r\naEDZrC32af4UDopRiSxqIZDvAAwNgWx55GIZr1fVqB5onAUKxB74cvIdln15\r\n2TTOaFxxsWVmRSygwgzRdTyHenwHgToHojgSURip4sU3luMXUoX8lvoq6F/7\r\nNGCuaCRuNJYjQyOIe6wAFwD7HSlOlS3F1mL3+Z5lh03P62OQb4njcr9AxXFw\r\n5x93Cx1qetCVzVVG3Ro0zRHqCAY+R4/rTgieNQhtHHwr1aNu88omDD7nQ+Vn\r\neWQcpQi4+HeK5TXYbnsD+zV7zoyJbNlLKQXglzPVewledX2zvpr2eTNDt/lG\r\nGbcJoSxC1SQlVAHnVcBome8dbZEQpc6gbdX5/I8I/CROQY2+eZ+h84fQjDQx\r\npFEVpswLXBdAaS+WH+8CZE9AGzBpyVlZwv7lHa7TEgRD8ZGYPD7kHmhNJkE3\r\nm+F2dFVoIN5iAYeVvI1arXWT9oepF1FGJpTAl219cl3KIPhhPeKpUt8DVDLf\r\nM0dBQH6IzbEO3a3xffR80ossBXn3Ts5YLTM=\r\n=1BOB\r\n-----END PGP SIGNATURE-----\r\n","size":3607},"_npmUser":{"name":"anonymous","email":"james.sumners@gmail.com"},"directories":{},"maintainers":[{"name":"anonymous","email":"sbekkhus91@gmail.com"},{"name":"anonymous","email":"community@coopflow.com"},{"name":"anonymous","email":"simone.busoli@gmail.com"},{"name":"anonymous","email":"rafael.nunu@hotmail.com"},{"name":"anonymous","email":"deusdustin@gmail.com"},{"name":"anonymous","email":"tommydelved@gmail.com"},{"name":"anonymous","email":"hello@matteocollina.com"},{"name":"anonymous","email":"tomallevi@gmail.com"},{"name":"anonymous","email":"james.sumners@gmail.com"},{"name":"anonymous","email":"vince.legoff@gmail.com"},{"name":"anonymous","email":"ethan@arrowood.dev"},{"name":"anonymous","email":"behemoth89@gmail.com"},{"name":"anonymous","email":"maksim@sinik.it"},{"name":"anonymous","email":"david.mark.clements@gmail.com"},{"name":"anonymous","email":"harry@harry.me"},{"name":"anonymous","email":"iselwin@gmail.com"},{"name":"anonymous","email":"kaka@kakawebsitedemo.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/error_2.0.0_1651067421136_0.273719790762587"},"_hasShrinkwrap":false,"_cnpmcore_publish_time":"2022-04-27T14:43:47.086Z","contributors":[]},"3.0.0":{"name":"@fastify/error","version":"3.0.0","description":"A small utility, used by Fastify itself, for generating consistent error objects across your codebase and plugins.","main":"index.js","types":"index.d.ts","scripts":{"test":"standard && ava -v && tsd"},"repository":{"type":"git","url":"git+https://github.com/fastify/fastify-error.git"},"keywords":["fastify","error","utility","plugin"],"author":{"name":"Tomas Della Vedova"},"license":"MIT","bugs":{"url":"https://github.com/fastify/fastify-error/issues"},"homepage":"https://github.com/fastify/fastify-error#readme","devDependencies":{"@types/node":"^17.0.0","ava":"^4.0.1","standard":"^17.0.0","tsd":"^0.20.0","typescript":"^4.1.3"},"tsd":{"compilerOptions":{"esModuleInterop":true}},"publishConfig":{"access":"public"},"gitHead":"7aa465837afaaf3471002caa655c1b77fa2e37c2","_id":"@fastify/error@3.0.0","_nodeVersion":"16.15.0","_npmVersion":"8.5.5","dist":{"integrity":"sha512-dPRyT40GiHRzSCll3/Jn2nPe25+E1VXc9tDwRAIKwFCxd5Np5wzgz1tmooWG3sV0qKgrBibihVoCna2ru4SEFg==","shasum":"bfcb7b33cec0196413083a91ef2edc7b2c88455b","tarball":"http://123.232.10.234:8212/nexus/content/groups/npm-public/@fastify/error/-/error-3.0.0.tgz","fileCount":9,"unpackedSize":9973,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDvHHqOlhu5hgrNXmzts1vQ6afhkgqqm8eqHNakaLw5EgIhAMXCAxsZGHoK2EfOX1a/8GTrx74T1fsSxgDzxnNfm3T/"}],"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJii5cmACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmoqWQ//ftvGPOq8ImbZ4sC3osZj+rOXz+209B4SAXTTs0TVPXSdnIUd\r\nL+LAzhPdygrB4HN5BKlUtY6MdgWQTQ0yCBJA+uiC6vmF2utiG0+SjoJQXg0N\r\nR4gGTxG8+k/9GRb9gAxhcyK0ylWF8A2TBreIyGSV/uLLq6gFQbgAOiS8ZPtr\r\nIlif4/e83STclHMxIMpEdS4HG3pr7I91x1uylIaPr+YTm8DHe6MzJWffvMuX\r\nsw2qTaUL7cIi3+hxfLURU892QaHdENYp/xzsi9IGewwNWqrl1uya6r1EIZPe\r\nCYCkXmRpMV35SC6DmtK0/w4EdkpdWa0birRvdyugkI0MHqHi0NUZX7LKs6FE\r\nop8uX9CwDJ9uPK/Le+asDltCPNzbVxrTkW5OPenN8ZTsPFv0rr1sRYec/W07\r\nyCcIp8PVR4xe+r0OLbQOTPSgjghEk1C+Nfv8KTiQMZ4AdzBZr3Dpc/7J9sQw\r\nzbTVN/PEF0X3/pk1GBZEkk7aUuvNXRf0Gq/ZRQvP3rx4eSe5zynHPxlQe43L\r\nfN5Hn2JU+PWDByLNpWC+jErzIZutEA9IcH5KwB1D+xJqpMU1ydL8PmMdV47c\r\ne3c1dm9cqAj1M88xQO2jGHMczg+OR6uQh1MrSYexxEXuLyR26iFpDpgUUxCt\r\n8s+H/X8q+3BbhHvB7R5jZ0VYo/CP0AIvO5U=\r\n=gZ07\r\n-----END PGP SIGNATURE-----\r\n","size":3330},"_npmUser":{"name":"anonymous","email":"hello@matteocollina.com"},"directories":{},"maintainers":[{"name":"anonymous","email":"sbekkhus91@gmail.com"},{"name":"anonymous","email":"community@coopflow.com"},{"name":"anonymous","email":"simone.busoli@gmail.com"},{"name":"anonymous","email":"rafael.nunu@hotmail.com"},{"name":"anonymous","email":"deusdustin@gmail.com"},{"name":"anonymous","email":"tommydelved@gmail.com"},{"name":"anonymous","email":"hello@matteocollina.com"},{"name":"anonymous","email":"tomallevi@gmail.com"},{"name":"anonymous","email":"james.sumners@gmail.com"},{"name":"anonymous","email":"vince.legoff@gmail.com"},{"name":"anonymous","email":"ethan@arrowood.dev"},{"name":"anonymous","email":"behemoth89@gmail.com"},{"name":"anonymous","email":"maksim@sinik.it"},{"name":"anonymous","email":"david.mark.clements@gmail.com"},{"name":"anonymous","email":"harry@harry.me"},{"name":"anonymous","email":"iselwin@gmail.com"},{"name":"anonymous","email":"kaka@kakawebsitedemo.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/error_3.0.0_1653315366468_0.30642010499995354"},"_hasShrinkwrap":false,"_cnpmcore_publish_time":"2022-05-23T15:45:44.525Z","contributors":[]},"3.1.0":{"name":"@fastify/error","version":"3.1.0","description":"A small utility, used by Fastify itself, for generating consistent error objects across your codebase and plugins.","main":"index.js","types":"types/index.d.ts","scripts":{"lint":"standard","test":"npm run test:unit && npm run test:typescript","test:unit":"tap","test:typescript":"tsd"},"repository":{"type":"git","url":"git+https://github.com/fastify/fastify-error.git"},"keywords":["fastify","error","utility","plugin"],"author":{"name":"Tomas Della Vedova"},"license":"MIT","bugs":{"url":"https://github.com/fastify/fastify-error/issues"},"homepage":"https://github.com/fastify/fastify-error#readme","devDependencies":{"standard":"^17.0.0","tap":"^16.0.0","tsd":"^0.24.1"},"tsd":{"compilerOptions":{"esModuleInterop":true}},"publishConfig":{"access":"public"},"gitHead":"e4b4bd1aa0f4aa9914fd4fc0160d71a51bfcbf20","_id":"@fastify/error@3.1.0","_nodeVersion":"16.17.0","_npmVersion":"9.1.2","dist":{"integrity":"sha512-jmk3Q822+xi8jVzGsux3mWd+9O4rzVUGCqR2+JlF9LkCeeUmRdxPd2Je6S7IGMk5VTtB0xyB3crRQqklUyQ6dQ==","shasum":"e29376f7ec522a8abecbe7dc04756e92089b73ae","tarball":"http://123.232.10.234:8212/nexus/content/groups/npm-public/@fastify/error/-/error-3.1.0.tgz","fileCount":10,"unpackedSize":10906,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIG78ArCOV2WK/QoES5PkWgXzzxL30OXRWfAwQ5b+F8bYAiAYBQq7LJRs3k1CuevetEKNhgyJ0BnDwDgBOvfAZpbniw=="}],"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJjipBxACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2Vmpz5A//eQt7/rTtIwqfzKQBnGiLsSYxXrGLz+ii7lhLOxca6BtxW5wm\r\n4Ur+E/GnYvb40YZPsoo1E6Dtdo7lFGbdcxzI9DHPbuO/HcD/hEwmswSd7Uu+\r\nBSs+GQIoyoUwtznVF44y+vuqjGOJnWHNu4lZj4f7Usi+TNlH2V46nbuqXU2+\r\nrR2r4V20SouIQ6ibZ6PgMCx2M3LeGjmDEQNDvndWg6gF8u7tCe7ftYDVJcn4\r\nwBZnljJbW69ESObse+jzwMEshGocrKJf7MSixY7A+AubBuSYZw3LSVq9yfCk\r\nc9rbq3mf5Sc7kHoRux7hQtVlFU1pnczXEHNHr6XGiSFg9pT55wTD0dZFxArT\r\nWW3bdkTy6rE9MlUjANwNOm7S8sD+Iwkrg5JN8XecMvOb0F6A+hmutc3efPYv\r\nO0SwocLsuQ5eQ/m6yzgVj5hiauIzFGUc11Pk04J1SI3g6Nb3+h9t/zILuHYv\r\n75CWJdkAP0oezMDmUX5Npoedd7/CdSSyV6RwCbx5RLJ1NxTBL/xy6FTocWpo\r\nwA9L/0KIdVQJkWU9V6cQlIiVO5q17PJ4aBaHkm6ibMHC5+g+NW9QEwKnvjc9\r\nvrTeDEKbaD6ae/iCxDaVeS1tQhhE0EYDmEwOf7vqeGvhFNHtoR+gOWgToWkc\r\nne73LOrvYmjvrohiTkTPyDfto0Sw4prHdpk=\r\n=m0jc\r\n-----END PGP SIGNATURE-----\r\n","size":3504},"_npmUser":{"name":"anonymous","email":"hello@matteocollina.com"},"directories":{},"maintainers":[{"name":"anonymous","email":"jonasgalvez@gmail.com"},{"name":"anonymous","email":"sbekkhus91@gmail.com"},{"name":"anonymous","email":"community@coopflow.com"},{"name":"anonymous","email":"simone.busoli@gmail.com"},{"name":"anonymous","email":"rafael.nunu@hotmail.com"},{"name":"anonymous","email":"deusdustin@gmail.com"},{"name":"anonymous","email":"tommydelved@gmail.com"},{"name":"anonymous","email":"hello@matteocollina.com"},{"name":"anonymous","email":"tomallevi@gmail.com"},{"name":"anonymous","email":"james.sumners@gmail.com"},{"name":"anonymous","email":"vince.legoff@gmail.com"},{"name":"anonymous","email":"behemoth89@gmail.com"},{"name":"anonymous","email":"maksim@sinik.it"},{"name":"anonymous","email":"david.mark.clements@gmail.com"},{"name":"anonymous","email":"harry@harry.me"},{"name":"anonymous","email":"iselwin@gmail.com"},{"name":"anonymous","email":"kaka@kakawebsitedemo.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/error_3.1.0_1670025329041_0.968876535294728"},"_hasShrinkwrap":false,"_cnpmcore_publish_time":"2022-12-02T23:55:34.272Z","contributors":[]},"3.2.0":{"name":"@fastify/error","version":"3.2.0","description":"A small utility, used by Fastify itself, for generating consistent error objects across your codebase and plugins.","main":"index.js","types":"types/index.d.ts","scripts":{"lint":"standard","test":"npm run test:unit && npm run test:typescript","test:unit":"tap","test:typescript":"tsd"},"repository":{"type":"git","url":"git+https://github.com/fastify/fastify-error.git"},"keywords":["fastify","error","utility","plugin"],"author":{"name":"Tomas Della Vedova"},"license":"MIT","bugs":{"url":"https://github.com/fastify/fastify-error/issues"},"homepage":"https://github.com/fastify/fastify-error#readme","devDependencies":{"standard":"^17.0.0","tap":"^16.0.0","tsd":"^0.25.0"},"tsd":{"compilerOptions":{"esModuleInterop":true}},"publishConfig":{"access":"public"},"gitHead":"392e798c2f7d86a8e9d02c90a773c190fe23a4eb","_id":"@fastify/error@3.2.0","_nodeVersion":"16.17.0","_npmVersion":"9.1.2","dist":{"integrity":"sha512-KAfcLa+CnknwVi5fWogrLXgidLic+GXnLjijXdpl8pvkvbXU5BGa37iZO9FGvsh9ZL4y+oFi5cbHBm5UOG+dmQ==","shasum":"9010e0acfe07965f5fc7d2b367f58f042d0f4106","tarball":"http://123.232.10.234:8212/nexus/content/groups/npm-public/@fastify/error/-/error-3.2.0.tgz","fileCount":10,"unpackedSize":11617,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQCVILeQ47hq7IMOUeeI43gdIn5+nem33X5Cuk21DIQBWAIhAM8B4/lTNIBvx7LB8Y7sTJ+sh40WzN2vPsRMiPqfrQcx"}],"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJjkR/hACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2Vmq1hg//eFeFdBXofwLCeRi2Ej77erpofrnSb7I4Yi4EUnJPEtaRxfgu\r\nqPqTi51eLVheWjm5FM0amclMD/uEITPM+kfTBRGTT2XXVVsbldMVH8FkSt9C\r\nMW90FyWLVaJRbJCD7b1+lQ8He80NG1Lr4PiXZHr+aua8hW+Pzf9+UPbtJCPe\r\nUD1+/Dunt5MbSQ2V/c6ZY2NE4gAr0uMXFmgpDhkFOWicOmH3Ttn8NL6YqelJ\r\nl2vuE/GCY7CEjEx0q7DXPgWQBg3s8wACIKxXiwI9F91qovMJRcE/TlxQ1b5j\r\nEMGyv70wDy/eiKu0KKceN4n0/fTb31ET40yMdaLQlZABB+YMdwi809P933AT\r\nMRez3I+Qs8pB4mmFl2evNj+1ELqvK/d4maxFEaOpPXE6vpfUMOoPO/Q3iM2R\r\n0mv/IFDC416LXw9mZiL2rI6itOQgkb0tiXZ+FHe6884pJIPN2GXml1OBhVIT\r\no6sFOrrufXzBnsiFceyLBv9iPo2IBFT7wVvJhSMBSapA5e+vG/QCfMB9VekY\r\nCzGImW16sI4w30whafJ3gJfRG6+ngIO8W5xmIEoeaVwKf1d5Bn0gAZpA3KnI\r\n4Ne6/QpVyA2JiajjH08XvcWaYlIFXGpKGl9Hx2yJN5yiBU9GXMWaKD+pJr7M\r\nUni3T6ziTby3SjoXwY7Hlnxq3a9MBlr5HKY=\r\n=f84d\r\n-----END PGP SIGNATURE-----\r\n","size":3620},"_npmUser":{"name":"anonymous","email":"hello@matteocollina.com"},"directories":{},"maintainers":[{"name":"anonymous","email":"jonasgalvez@gmail.com"},{"name":"anonymous","email":"sbekkhus91@gmail.com"},{"name":"anonymous","email":"community@coopflow.com"},{"name":"anonymous","email":"simone.busoli@gmail.com"},{"name":"anonymous","email":"rafael.nunu@hotmail.com"},{"name":"anonymous","email":"deusdustin@gmail.com"},{"name":"anonymous","email":"tommydelved@gmail.com"},{"name":"anonymous","email":"hello@matteocollina.com"},{"name":"anonymous","email":"tomallevi@gmail.com"},{"name":"anonymous","email":"james.sumners@gmail.com"},{"name":"anonymous","email":"vince.legoff@gmail.com"},{"name":"anonymous","email":"behemoth89@gmail.com"},{"name":"anonymous","email":"maksim@sinik.it"},{"name":"anonymous","email":"david.mark.clements@gmail.com"},{"name":"anonymous","email":"harry@harry.me"},{"name":"anonymous","email":"iselwin@gmail.com"},{"name":"anonymous","email":"kaka@kakawebsitedemo.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/error_3.2.0_1670455265133_0.4616679981935232"},"_hasShrinkwrap":false,"_cnpmcore_publish_time":"2022-12-07T23:29:22.409Z","contributors":[]},"3.2.1":{"name":"@fastify/error","version":"3.2.1","description":"A small utility, used by Fastify itself, for generating consistent error objects across your codebase and plugins.","main":"index.js","types":"types/index.d.ts","scripts":{"lint":"standard","lint:fix":"standard --fix","test":"npm run test:unit && npm run test:typescript","test:unit":"tap","test:typescript":"tsd"},"repository":{"type":"git","url":"git+https://github.com/fastify/fastify-error.git"},"keywords":["fastify","error","utility","plugin"],"author":{"name":"Tomas Della Vedova"},"license":"MIT","bugs":{"url":"https://github.com/fastify/fastify-error/issues"},"homepage":"https://github.com/fastify/fastify-error#readme","devDependencies":{"benchmark":"^2.1.4","standard":"^17.0.0","tap":"^16.0.0","tsd":"^0.28.0"},"tsd":{"compilerOptions":{"esModuleInterop":true}},"publishConfig":{"access":"public"},"gitHead":"137a6ebc75e72d5baf7f3faf25db24d3a5b95e03","_id":"@fastify/error@3.2.1","_nodeVersion":"18.13.0","_npmVersion":"8.19.3","dist":{"integrity":"sha512-scZVbcpPNWw/yyFmzzO7cf1daTeJp53spN2n7dBTHZd+cV7791fcWJCPP1Tfhdbre+8vDiCyQyqqXfQnYMntYQ==","shasum":"5d1cb182a8bb9b103c556b0da35fd77f319fc15e","tarball":"http://123.232.10.234:8212/nexus/content/groups/npm-public/@fastify/error/-/error-3.2.1.tgz","fileCount":14,"unpackedSize":16535,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDwVnFdqPivwjEjfKVSEBm9eS2I+AyBzW7kUxfC21xMQgIgZq8aZCTv65uCZJN65EtfqtFxa0H9y5Y9Km3h4+Gla0w="}]},"_npmUser":{"name":"anonymous","email":"kaka@kakawebsitedemo.com"},"directories":{},"maintainers":[{"name":"anonymous","email":"me@metcoder.dev"},{"name":"anonymous","email":"jonasgalvez@gmail.com"},{"name":"anonymous","email":"sbekkhus91@gmail.com"},{"name":"anonymous","email":"community@coopflow.com"},{"name":"anonymous","email":"simone.busoli@gmail.com"},{"name":"anonymous","email":"rafael.nunu@hotmail.com"},{"name":"anonymous","email":"deusdustin@gmail.com"},{"name":"anonymous","email":"tommydelved@gmail.com"},{"name":"anonymous","email":"hello@matteocollina.com"},{"name":"anonymous","email":"tomallevi@gmail.com"},{"name":"anonymous","email":"james.sumners@gmail.com"},{"name":"anonymous","email":"vince.legoff@gmail.com"},{"name":"anonymous","email":"behemoth89@gmail.com"},{"name":"anonymous","email":"maksim@sinik.it"},{"name":"anonymous","email":"harry@harry.me"},{"name":"anonymous","email":"iselwin@gmail.com"},{"name":"anonymous","email":"kaka@kakawebsitedemo.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/error_3.2.1_1685772855013_0.3680947120361664"},"_hasShrinkwrap":false,"contributors":[]},"3.3.0":{"name":"@fastify/error","version":"3.3.0","description":"A small utility, used by Fastify itself, for generating consistent error objects across your codebase and plugins.","main":"index.js","types":"types/index.d.ts","scripts":{"lint":"standard","lint:fix":"standard --fix","test":"npm run test:unit && npm run test:typescript","test:unit":"tap","test:typescript":"tsd"},"repository":{"type":"git","url":"git+https://github.com/fastify/fastify-error.git"},"keywords":["fastify","error","utility","plugin"],"author":{"name":"Tomas Della Vedova"},"license":"MIT","bugs":{"url":"https://github.com/fastify/fastify-error/issues"},"homepage":"https://github.com/fastify/fastify-error#readme","devDependencies":{"benchmark":"^2.1.4","standard":"^17.0.0","tap":"^16.0.0","tsd":"^0.28.0"},"tsd":{"compilerOptions":{"esModuleInterop":true}},"publishConfig":{"access":"public"},"gitHead":"514cb8f1a0431b62f689acc4b845361b60d70af3","_id":"@fastify/error@3.3.0","_nodeVersion":"18.16.0","_npmVersion":"9.5.1","dist":{"integrity":"sha512-dj7vjIn1Ar8sVXj2yAXiMNCJDmS9MQ9XMlIecX2dIzzhjSHCyKo4DdXjXMs7wKW2kj6yvVRSpuQjOZ3YLrh56w==","shasum":"eba790082e1144bfc8def0c2c8ef350064bc537b","tarball":"http://123.232.10.234:8212/nexus/content/groups/npm-public/@fastify/error/-/error-3.3.0.tgz","fileCount":14,"unpackedSize":16697,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIEZrPCKRZLvw8fYTGrjs/I9UI03f1lgWW8ee9nesO5pEAiEAn7a0MViiOFrtLWLHlwZwo6rvP3YmyipeciguFOetkfs="}]},"_npmUser":{"name":"anonymous","email":"hello@matteocollina.com"},"directories":{},"maintainers":[{"name":"anonymous","email":"me@metcoder.dev"},{"name":"anonymous","email":"jonasgalvez@gmail.com"},{"name":"anonymous","email":"sbekkhus91@gmail.com"},{"name":"anonymous","email":"community@coopflow.com"},{"name":"anonymous","email":"simone.busoli@gmail.com"},{"name":"anonymous","email":"rafael.nunu@hotmail.com"},{"name":"anonymous","email":"deusdustin@gmail.com"},{"name":"anonymous","email":"tommydelved@gmail.com"},{"name":"anonymous","email":"hello@matteocollina.com"},{"name":"anonymous","email":"tomallevi@gmail.com"},{"name":"anonymous","email":"james.sumners@gmail.com"},{"name":"anonymous","email":"vince.legoff@gmail.com"},{"name":"anonymous","email":"behemoth89@gmail.com"},{"name":"anonymous","email":"maksim@sinik.it"},{"name":"anonymous","email":"harry@harry.me"},{"name":"anonymous","email":"iselwin@gmail.com"},{"name":"anonymous","email":"kaka@kakawebsitedemo.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/error_3.3.0_1687528550962_0.4709038310436571"},"_hasShrinkwrap":false,"contributors":[]},"3.4.0":{"name":"@fastify/error","version":"3.4.0","description":"A small utility, used by Fastify itself, for generating consistent error objects across your codebase and plugins.","main":"index.js","types":"types/index.d.ts","scripts":{"lint":"standard","lint:fix":"standard --fix","test":"npm run test:unit && npm run test:typescript","test:unit":"tap","test:typescript":"tsd"},"repository":{"type":"git","url":"git+https://github.com/fastify/fastify-error.git"},"keywords":["fastify","error","utility","plugin"],"author":{"name":"Tomas Della Vedova"},"license":"MIT","bugs":{"url":"https://github.com/fastify/fastify-error/issues"},"homepage":"https://github.com/fastify/fastify-error#readme","devDependencies":{"benchmark":"^2.1.4","standard":"^17.0.0","tap":"^16.0.0","tsd":"^0.29.0"},"tsd":{"compilerOptions":{"esModuleInterop":true}},"publishConfig":{"access":"public"},"gitHead":"97a294781eb335b79d996c69fc70126faa0131e9","_id":"@fastify/error@3.4.0","_nodeVersion":"18.17.1","_npmVersion":"9.6.7","dist":{"integrity":"sha512-e/mafFwbK3MNqxUcFBLgHhgxsF8UT1m8aj0dAlqEa2nJEgPsRtpHTZ3ObgrgkZ2M1eJHPTwgyUl/tXkvabsZdQ==","shasum":"30df6601f4edce57a05ec5caaa90a28025a8554a","tarball":"http://123.232.10.234:8212/nexus/content/groups/npm-public/@fastify/error/-/error-3.4.0.tgz","fileCount":14,"unpackedSize":18096,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIHqKYfhQS/r3zqBHX/RmJwu/PzO0OZG/t4p8fgqYTpFRAiADiROX8MTNxXGshnElvBegEdpyRKLxsqKN6LEyQeM0cA=="}]},"_npmUser":{"name":"anonymous","email":"hello@matteocollina.com"},"directories":{},"maintainers":[{"name":"anonymous","email":"gurgun.dayioglu@icloud.com"},{"name":"anonymous","email":"me@metcoder.dev"},{"name":"anonymous","email":"jonasgalvez@gmail.com"},{"name":"anonymous","email":"sbekkhus91@gmail.com"},{"name":"anonymous","email":"community@coopflow.com"},{"name":"anonymous","email":"simone.busoli@gmail.com"},{"name":"anonymous","email":"rafael.nunu@hotmail.com"},{"name":"anonymous","email":"deusdustin@gmail.com"},{"name":"anonymous","email":"tommydelved@gmail.com"},{"name":"anonymous","email":"hello@matteocollina.com"},{"name":"anonymous","email":"tomallevi@gmail.com"},{"name":"anonymous","email":"james.sumners@gmail.com"},{"name":"anonymous","email":"vince.legoff@gmail.com"},{"name":"anonymous","email":"behemoth89@gmail.com"},{"name":"anonymous","email":"maksim@sinik.it"},{"name":"anonymous","email":"harry@harry.me"},{"name":"anonymous","email":"iselwin@gmail.com"},{"name":"anonymous","email":"kaka@kakawebsitedemo.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/error_3.4.0_1696330951036_0.5568816200020701"},"_hasShrinkwrap":false,"contributors":[]},"3.4.1":{"name":"@fastify/error","version":"3.4.1","description":"A small utility, used by Fastify itself, for generating consistent error objects across your codebase and plugins.","main":"index.js","type":"commonjs","types":"types/index.d.ts","scripts":{"lint":"standard","lint:fix":"standard --fix","test":"npm run test:unit && npm run test:typescript","test:unit":"tap","test:typescript":"tsd"},"repository":{"type":"git","url":"git+https://github.com/fastify/fastify-error.git"},"keywords":["fastify","error","utility","plugin"],"author":{"name":"Tomas Della Vedova"},"license":"MIT","bugs":{"url":"https://github.com/fastify/fastify-error/issues"},"homepage":"https://github.com/fastify/fastify-error#readme","devDependencies":{"benchmark":"^2.1.4","standard":"^17.0.0","tap":"^16.0.0","tsd":"^0.29.0"},"tsd":{"compilerOptions":{"esModuleInterop":true}},"publishConfig":{"access":"public"},"_id":"@fastify/error@3.4.1","gitHead":"a6ca31bf593eecfae11b694f709a1179ec5311cf","_nodeVersion":"18.18.2","_npmVersion":"9.8.1","dist":{"integrity":"sha512-wWSvph+29GR783IhmvdwWnN4bUxTD01Vm5Xad4i7i1VuAOItLvbPAb69sb0IQ2N57yprvhNIwAP5B6xfKTmjmQ==","shasum":"b14bb4cac3dd4ec614becbc643d1511331a6425c","tarball":"http://123.232.10.234:8212/nexus/content/groups/npm-public/@fastify/error/-/error-3.4.1.tgz","fileCount":15,"unpackedSize":18460,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCZrhD+OZmmG/XtI+oVpZYnYdVO+tlxKvkkmhVPOH5FnAIgEW0Mqs6V2efh0BVsgVDpgQG6W4MKuQFfBKynpPCuxvQ="}]},"_npmUser":{"name":"anonymous","email":"james.sumners@gmail.com"},"directories":{},"maintainers":[{"name":"anonymous","email":"gurgun.dayioglu@icloud.com"},{"name":"anonymous","email":"me@metcoder.dev"},{"name":"anonymous","email":"jonasgalvez@gmail.com"},{"name":"anonymous","email":"sbekkhus91@gmail.com"},{"name":"anonymous","email":"community@coopflow.com"},{"name":"anonymous","email":"simone.busoli@gmail.com"},{"name":"anonymous","email":"rafael.nunu@hotmail.com"},{"name":"anonymous","email":"deusdustin@gmail.com"},{"name":"anonymous","email":"tommydelved@gmail.com"},{"name":"anonymous","email":"hello@matteocollina.com"},{"name":"anonymous","email":"tomallevi@gmail.com"},{"name":"anonymous","email":"james.sumners@gmail.com"},{"name":"anonymous","email":"vince.legoff@gmail.com"},{"name":"anonymous","email":"behemoth89@gmail.com"},{"name":"anonymous","email":"maksim@sinik.it"},{"name":"anonymous","email":"harry@harry.me"},{"name":"anonymous","email":"iselwin@gmail.com"},{"name":"anonymous","email":"kaka@kakawebsitedemo.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/error_3.4.1_1699100330090_0.2841570415063941"},"_hasShrinkwrap":false,"contributors":[]},"4.0.0":{"name":"@fastify/error","version":"4.0.0","description":"A small utility, used by Fastify itself, for generating consistent error objects across your codebase and plugins.","main":"index.js","type":"commonjs","types":"types/index.d.ts","scripts":{"lint":"standard","lint:fix":"standard --fix","test":"npm run test:unit && npm run test:typescript","test:unit":"tap","test:typescript":"tsd"},"repository":{"type":"git","url":"git+https://github.com/fastify/fastify-error.git"},"keywords":["fastify","error","utility","plugin"],"author":{"name":"Tomas Della Vedova"},"license":"MIT","bugs":{"url":"https://github.com/fastify/fastify-error/issues"},"homepage":"https://github.com/fastify/fastify-error#readme","devDependencies":{"benchmark":"^2.1.4","standard":"^17.1.0","tap":"^18.7.1","tsd":"^0.31.0"},"tsd":{"compilerOptions":{"esModuleInterop":true}},"publishConfig":{"access":"public"},"_id":"@fastify/error@4.0.0","gitHead":"316bebea2b8625ba7974376202950e86cef5bcfa","_nodeVersion":"20.14.0","_npmVersion":"10.7.0","dist":{"integrity":"sha512-OO/SA8As24JtT1usTUTKgGH7uLvhfwZPwlptRi2Dp5P4KKmJI3gvsZ8MIHnNwDs4sLf/aai5LzTyl66xr7qMxA==","shasum":"7842d6161fbce78953638318be99033a0c2d5070","tarball":"http://123.232.10.234:8212/nexus/content/groups/npm-public/@fastify/error/-/error-4.0.0.tgz","fileCount":15,"unpackedSize":18464,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQCSH9b/bRoqp7B8zFIt9hxkQK9y9ccJHJ5q1ThiWC1jRAIhANN3xue9cItcGMwCHyc4rkAeiv8NVAJfs4jbqWE/hnks"}]},"_npmUser":{"name":"anonymous","email":"james.sumners@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/error_4.0.0_1718999240861_0.650744188107683"},"_hasShrinkwrap":false,"contributors":[]},"4.1.0":{"name":"@fastify/error","version":"4.1.0","description":"A small utility, used by Fastify itself, for generating consistent error objects across your codebase and plugins.","main":"index.js","type":"commonjs","types":"types/index.d.ts","scripts":{"lint":"eslint","lint:fix":"eslint --fix","test":"npm run test:unit && npm run test:typescript","test:unit":"c8 --100 node --test","test:typescript":"tsd"},"repository":{"type":"git","url":"git+https://github.com/fastify/fastify-error.git"},"keywords":["fastify","error","utility","plugin"],"author":{"name":"Tomas Della Vedova"},"contributors":[{"name":"Matteo Collina","email":"hello@matteocollina.com"},{"name":"James Sumners","url":"https://james.sumners.info"},{"name":"Aras Abbasi","email":"aras.abbasi@gmail.com"},{"name":"Frazer Smith","email":"frazer.dev@icloud.com","url":"https://github.com/fdawgs"}],"license":"MIT","bugs":{"url":"https://github.com/fastify/fastify-error/issues"},"homepage":"https://github.com/fastify/fastify-error#readme","funding":[{"type":"github","url":"https://github.com/sponsors/fastify"},{"type":"opencollective","url":"https://opencollective.com/fastify"}],"devDependencies":{"benchmark":"^2.1.4","c8":"^10.1.2","eslint":"^9.17.0","neostandard":"^0.12.0","tsd":"^0.31.0"},"tsd":{"compilerOptions":{"esModuleInterop":true}},"publishConfig":{"access":"public"},"_id":"@fastify/error@4.1.0","gitHead":"a8c274c416da0ecdd367901cbe309600288d4585","_nodeVersion":"22.14.0","_npmVersion":"10.9.2","dist":{"integrity":"sha512-KeFcciOr1eo/YvIXHP65S94jfEEqn1RxTRBT1aJaHxY5FK0/GDXYozsQMMWlZoHgi8i0s+YtrLsgj/JkUUjSkQ==","shasum":"a6a3a8d2309bd8d3441512dff9a7c739d0c35fe2","tarball":"http://123.232.10.234:8212/nexus/content/groups/npm-public/@fastify/error/-/error-4.1.0.tgz","fileCount":15,"unpackedSize":21651,"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEYCIQCzu01vXLi4rfOWTSJhVYDVn7YYLZWwNi44diOfRADDlgIhALzva59rh0jYdpj2+co/5byrTjJaUAs2Hj2DU2g1fgFM"}],"size":5266},"_npmUser":{"name":"anonymous","email":"hey@gurgun.day"},"directories":{},"maintainers":[{"name":"anonymous","email":"deusdustin@gmail.com"},{"name":"anonymous","email":"simone.busoli@gmail.com"},{"name":"anonymous","email":"community@coopflow.com"},{"name":"anonymous","email":"tommydelved@gmail.com"},{"name":"anonymous","email":"hello@matteocollina.com"},{"name":"anonymous","email":"tomallevi@gmail.com"},{"name":"anonymous","email":"james.sumners@gmail.com"},{"name":"anonymous","email":"vince.legoff@gmail.com"},{"name":"anonymous","email":"rafael.nunu@hotmail.com"},{"name":"anonymous","email":"behemoth89@gmail.com"},{"name":"anonymous","email":"maksim@sinik.it"},{"name":"anonymous","email":"harry@harry.me"},{"name":"anonymous","email":"iselwin@gmail.com"},{"name":"anonymous","email":"kaka@kakawebsitedemo.com"},{"name":"anonymous","email":"jonasgalvez@gmail.com"},{"name":"anonymous","email":"sbekkhus91@gmail.com"},{"name":"anonymous","email":"hey@gurgun.day"},{"name":"anonymous","email":"me@metcoder.dev"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/error_4.1.0_1741804741919_0.22208424351399514"},"_hasShrinkwrap":false,"_cnpmcore_publish_time":"2025-03-12T18:39:02.128Z","publish_time":1741804742128,"_source_registry_name":"default"},"4.2.0":{"name":"@fastify/error","version":"4.2.0","description":"A small utility, used by Fastify itself, for generating consistent error objects across your codebase and plugins.","main":"index.js","type":"commonjs","types":"types/index.d.ts","scripts":{"lint":"eslint","lint:fix":"eslint --fix","test":"npm run test:unit && npm run test:typescript","test:unit":"c8 --100 node --test","test:typescript":"tsd"},"repository":{"type":"git","url":"git+https://github.com/fastify/fastify-error.git"},"keywords":["fastify","error","utility","plugin"],"author":{"name":"Tomas Della Vedova"},"contributors":[{"name":"Matteo Collina","email":"hello@matteocollina.com"},{"name":"James Sumners","url":"https://james.sumners.info"},{"name":"Aras Abbasi","email":"aras.abbasi@gmail.com"},{"name":"Frazer Smith","email":"frazer.dev@icloud.com","url":"https://github.com/fdawgs"}],"license":"MIT","bugs":{"url":"https://github.com/fastify/fastify-error/issues"},"homepage":"https://github.com/fastify/fastify-error#readme","funding":[{"type":"github","url":"https://github.com/sponsors/fastify"},{"type":"opencollective","url":"https://opencollective.com/fastify"}],"devDependencies":{"benchmark":"^2.1.4","c8":"^10.1.2","eslint":"^9.17.0","neostandard":"^0.12.0","tsd":"^0.32.0"},"tsd":{"compilerOptions":{"esModuleInterop":true}},"publishConfig":{"access":"public"},"_id":"@fastify/error@4.2.0","gitHead":"3b27b7600007a85ff5c1acac5a3254be27cb6f51","_nodeVersion":"22.10.0","_npmVersion":"10.9.0","dist":{"integrity":"sha512-RSo3sVDXfHskiBZKBPRgnQTtIqpi/7zhJOEmAxCiBcM7d0uwdGdxLlsCaLzGs8v8NnxIRlfG0N51p5yFaOentQ==","shasum":"d40f46ba75f541fdcc4dc276b7308bbc8e8e6d7a","tarball":"http://123.232.10.234:8212/nexus/content/groups/npm-public/@fastify/error/-/error-4.2.0.tgz","fileCount":16,"unpackedSize":36872,"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEUCIQDXBKm0Jdx9VCvyfDwkd+PHum2O1B8BH/bbZtGizJKTEgIgSQ50zfQCJIRGCcL9qKvgrTq6GaOow5N5PJrqNALwRRA="}],"size":7928},"_npmUser":{"name":"anonymous","email":"behemoth89@gmail.com"},"directories":{},"maintainers":[{"name":"anonymous","email":"deusdustin@gmail.com"},{"name":"anonymous","email":"simone.busoli@gmail.com"},{"name":"anonymous","email":"community@coopflow.com"},{"name":"anonymous","email":"tommydelved@gmail.com"},{"name":"anonymous","email":"hello@matteocollina.com"},{"name":"anonymous","email":"tomallevi@gmail.com"},{"name":"anonymous","email":"james.sumners@gmail.com"},{"name":"anonymous","email":"vince.legoff@gmail.com"},{"name":"anonymous","email":"rafael.nunu@hotmail.com"},{"name":"anonymous","email":"behemoth89@gmail.com"},{"name":"anonymous","email":"maksim@sinik.it"},{"name":"anonymous","email":"harry@harry.me"},{"name":"anonymous","email":"iselwin@gmail.com"},{"name":"anonymous","email":"kaka@kakawebsitedemo.com"},{"name":"anonymous","email":"jonasgalvez@gmail.com"},{"name":"anonymous","email":"sbekkhus91@gmail.com"},{"name":"anonymous","email":"hey@gurgun.day"},{"name":"anonymous","email":"me@metcoder.dev"},{"name":"anonymous","email":"ivan@tymoshenko.me"},{"name":"anonymous","email":"frazer.dev@icloud.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/error_4.2.0_1748764574381_0.7383941785867789"},"_hasShrinkwrap":false,"_cnpmcore_publish_time":"2025-06-01T07:56:14.569Z","publish_time":1748764574569,"_source_registry_name":"default"}},"dist-tags":{"latest":"4.2.0"},"name":"@fastify/error","time":{"created":"2022-04-27T14:43:53.429Z","modified":"2026-03-05T20:02:07.629Z","2.0.0":"2022-04-27T13:50:21.339Z","3.0.0":"2022-05-23T14:16:06.598Z","3.1.0":"2022-12-02T23:55:29.214Z","3.2.0":"2022-12-07T23:21:05.300Z","3.2.1":"2023-06-03T06:14:15.188Z","3.3.0":"2023-06-23T13:55:51.110Z","3.4.0":"2023-10-03T11:02:31.184Z","3.4.1":"2023-11-04T12:18:50.301Z","4.0.0":"2024-06-21T19:47:21.045Z","4.1.0":"2025-03-12T18:39:02.128Z","4.2.0":"2025-06-01T07:56:14.569Z"},"readme":"# @fastify/error\n\n[![CI](https://github.com/fastify/fastify-error/actions/workflows/ci.yml/badge.svg?branch=main)](https://github.com/fastify/fastify-error/actions/workflows/ci.yml)\n[![NPM version](https://img.shields.io/npm/v/@fastify/error.svg?style=flat)](https://www.npmjs.com/package/@fastify/error)\n[![neostandard javascript style](https://img.shields.io/badge/code_style-neostandard-brightgreen?style=flat)](https://github.com/neostandard/neostandard)\n\nA small utility, used by Fastify itself, for generating consistent error objects across your codebase and plugins.\n\n### Install\n```\nnpm i @fastify/error\n```\n\n### Usage\n\nThe module exports a function that you can use for consistent error objects, it takes 4 parameters:\n\n```js\ncreateError(code, message [, statusCode [, Base [, captureStackTrace]]])\n```\n\n- `code` (`string`, required) - The error code, you can access it later with `error.code`. For consistency, we recommend prefixing plugin error codes with `FST_`\n- `message` (`string`, required) - The error message. You can also use interpolated strings for formatting the message.\n- `statusCode` (`number`, optional) - The status code that Fastify will use if the error is sent via HTTP.\n- `Base` (`ErrorConstructor`, optional) - The base error object that will be used. (eg `TypeError`, `RangeError`)\n- `captureStackTrace` (`boolean`, optional) - Whether to capture the stack trace or not.\n\n```js\nconst createError = require('@fastify/error')\nconst CustomError = createError('ERROR_CODE', 'Hello')\nconsole.log(new CustomError()) // error.message => 'Hello'\n```\n\nHow to use an interpolated string:\n```js\nconst createError = require('@fastify/error')\nconst CustomError = createError('ERROR_CODE', 'Hello %s')\nconsole.log(new CustomError('world')) // error.message => 'Hello world'\n```\n\nHow to add cause:\n```js\nconst createError = require('@fastify/error')\nconst CustomError = createError('ERROR_CODE', 'Hello %s')\nconsole.log(new CustomError('world', {cause: new Error('cause')}))\n// error.message => 'Hello world'\n// error.cause => Error('cause')\n```\n\n### TypeScript\n\nIt is possible to limit your error constructor with a generic type using TypeScript:\n\n```ts\nconst CustomError = createError<[string]>('ERROR_CODE', 'Hello %s')\nnew CustomError('world')\n//@ts-expect-error\nnew CustomError(1)\n```\n\n### instanceof\n\nAll errors created with `createError` will be instances of the base error constructor you provided, or `Error` if none was provided.\n\n```js\nconst createError = require('@fastify/error')\nconst CustomError = createError('ERROR_CODE', 'Hello %s', 500, TypeError)\nconst customError = new CustomError('world')\n\nconsole.log(customError instanceof CustomError) // true\nconsole.log(customError instanceof TypeError) // true\nconsole.log(customError instanceof Error) // true\n```\n\nAll instantiated errors are instances of the `FastifyError` class, which can be required directly from the module.\n\n```js\nconst { createError, FastifyError } = require('@fastify/error')\nconst CustomError = createError('ERROR_CODE', 'Hello %s', 500, TypeError)\nconst customError = new CustomError('world')\n\nconsole.log(customError instanceof FastifyError) // true\n```\n\nA `FastifyError` created by `createError` can extend another `FastifyError` while maintaining correct `instanceof` behavior.\n\n```js\nconst { createError, FastifyError } = require('@fastify/error')\n\nconst CustomError = createError('ERROR_CODE', 'Hello %s', 500, TypeError)\nconst ChildCustomError = createError('CHILD_ERROR_CODE', 'Hello %s', 500, CustomError)\n\nconst customError = new ChildCustomError('world')\n\nconsole.log(customError instanceof ChildCustomError) // true\nconsole.log(customError instanceof CustomError) // true\nconsole.log(customError instanceof FastifyError) // true\nconsole.log(customError instanceof TypeError) // true\nconsole.log(customError instanceof Error) // true\n```\n\nIf `fastify-error` is installed multiple times directly or as a transitive dependency, `instanceof` checks for errors created by `createError` will still work correctly across these installations, as long as their error codes (e.g., `FST_ERR_CUSTOM_ERROR`) are identical.\n\n```js\nconst { createError, FastifyError } = require('@fastify/error')\n\n// CustomError from `@fastify/some-plugin` is created with `createError` and\n// has its own `@fastify/error` installation as dependency. CustomError has\n// FST_ERR_CUSTOM_ERROR as code.\nconst { CustomError: CustomErrorFromPlugin } = require('@fastify/some-plugin')\n\nconst CustomError = createError('FST_ERR_CUSTOM_ERROR', 'Hello %s', 500)\n\nconst customError = new CustomError('world')\nconst customErrorFromPlugin = new CustomErrorFromPlugin('world')\n\nconsole.log(customError instanceof CustomError) // true\nconsole.log(customError instanceof CustomErrorFromPlugin) // true\nconsole.log(customErrorFromPlugin instanceof CustomError) // true\nconsole.log(customErrorFromPlugin instanceof CustomErrorFromPlugin) // true\n```\n\nChanging the code of an instantiated Error will not change the result of the `instanceof` operator.\n\n```js\nconst { createError, FastifyError } = require('@fastify/error')\n\nconst CustomError = createError('ERROR_CODE', 'Hello %s', 500, TypeError)\nconst AnotherCustomError = createError('ANOTHER_ERROR_CODE', 'Hello %s', 500, CustomError)\n\nconst customError = new CustomError('world')\ncustomError.code = 'ANOTHER_ERROR_CODE'\n\nconsole.log(customError instanceof CustomError) // true\nconsole.log(customError instanceof AnotherCustomError) // false\n```\n\n## License\n\nLicensed under [MIT](./LICENSE).","users":{}}