{"_id":"@curveball/http-errors","_rev":"14-44f59d6c67d7973b374357ecdfc765b0","name":"@curveball/http-errors","dist-tags":{"latest":"1.0.1"},"versions":{"0.0.1":{"name":"@curveball/http-errors","version":"0.0.1","description":"A standard package for HTTP exceptions","main":"dist/index.js","scripts":{"prepublish":"make build","test":"make lint test","tsc":"tsc"},"repository":{"type":"git","url":"git+https://github.com/curveballjs/http-errors.git"},"keywords":["http","framework","nodejs","typescript","curveball"],"author":{"name":"Evert Pot","url":"https://evertpot.com/"},"license":"MIT","bugs":{"url":"https://github.com/curveballjs/http-errors/issues"},"homepage":"https://github.com/curveballjs/http-errors#readme","devDependencies":{"@types/chai":"^4.1.4","@types/mocha":"^5.2.3","@types/node":"^10.3.6","@types/sinon":"^5.0.1","chai":"^4.1.2","mocha":"^5.2.0","nyc":"^12.0.2","sinon":"^6.0.1","ts-node":"^7.0.0","tslint":"^5.10.0","typescript":"^2.9.2"},"types":"dist/","nyc":{"extension":[".ts"]},"gitHead":"87aecfafb84fc9994f51db604507dc6f3d488360","_id":"@curveball/http-errors@0.0.1","_npmVersion":"6.4.0","_nodeVersion":"10.10.0","_npmUser":{"name":"evrt","email":"me@evertpot.com"},"dist":{"integrity":"sha512-1J90BHSB2iapNlC0pX7GpqR1Z6FLTOnkUeF2sJ0s+ycsSZAuoYnSDNeKqSS6TJr1vgnxzKSTQ9aOb4fABl7+Og==","shasum":"daec19344e59ed78afc7d53b00a2a7fb78c7ee78","tarball":"https://registry.npmjs.org/@curveball/http-errors/-/http-errors-0.0.1.tgz","fileCount":7,"unpackedSize":6295,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJbl7KqCRA9TVsSAnZWagAAhBcP/RpP9zaNYkcphg9w+7JZ\nZj64rFxUE3ZH3BFrTPD37I9D/Yx4Qd92ITCDbKMT0KZV4Z8lQKo/AXADvlHX\nYoGfw/xgHuk5gfsthUlPD5QIgMbW4/QLWOMFqpYO1TpQ98XxbQIca4QB1OBa\nvr3VMQOuaSoh5CMxf0wxa/FB9PHvESs22mMW8zkPFtEWIzYNE8pul+7sYcZz\nlB+FLFWejqzfwwMvYqBu9xi4SziBiAmpUYg0kIYs/kk2aoqxk3e1cjINf/Pc\nxEhnjU/5XLpQa1HaveMvehzCqrWCsfI4JbnJloFX3ultDxJ9lNKnij50umUa\n9cKIqX9nXGf8SzWc7la6Zty1SEPXsVMcHbY8dIvBi1Jtiop3txFbL4fRjUQ7\n/yvDnvRPb5mZH9OSux7jyVxEFHcKcgMHXw4VfytNvH58gB/rKGSeLghz5nqF\nElZ4iN/csRcBqXEaKEhy9vJXE7Rw+6f9w/4WB2R8CHfQKI4UpXN5l2IMs4g9\nL+pBCOGHI1lvX0DehKKLjvN97ZrQxzvT+Y3CzEwMMAQslrkroTjHoetcxhRr\nZ1FGa18HOpMoh0+Rs2I5ktgn4MPIKA+gYrMnRnYexRlP00bCw7YMfiOUrxVA\nw6IWD+z2P95HIoiuIG5GT1Yybtkz9epCQEynsFV4XBNF0mTrQqowyayhH/rE\nLZJb\r\n=epzo\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQD1DjLC00fee6qB8wJ3QBkKOj2s0bN3hikoL1cCFS3xHwIhAKC9SeNG1iFTWnVPlt2LZ2EC4Uh0mRlkb7yqsjU2fN4R"}]},"maintainers":[{"name":"evrt","email":"me@evertpot.com"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/http-errors_0.0.1_1536668329930_0.5786246148979086"},"_hasShrinkwrap":false},"0.1.0":{"name":"@curveball/http-errors","version":"0.1.0","description":"A standard package for HTTP exceptions","main":"dist/index.js","scripts":{"prepublish":"make build","test":"make lint test","tsc":"tsc"},"repository":{"type":"git","url":"git+https://github.com/curveballjs/http-errors.git"},"keywords":["http","framework","nodejs","typescript","curveball"],"author":{"name":"Evert Pot","url":"https://evertpot.com/"},"license":"MIT","bugs":{"url":"https://github.com/curveballjs/http-errors/issues"},"homepage":"https://github.com/curveballjs/http-errors#readme","devDependencies":{"@types/chai":"^4.1.4","@types/mocha":"^5.2.3","@types/node":"^10.3.6","@types/sinon":"^5.0.1","chai":"^4.1.2","mocha":"^5.2.0","nyc":"^12.0.2","sinon":"^6.0.1","ts-node":"^7.0.0","tslint":"^5.10.0","typescript":"^2.9.2"},"types":"dist/","nyc":{"extension":[".ts"]},"gitHead":"125910747b00dac5b600cdadb16f88af73a9c701","_id":"@curveball/http-errors@0.1.0","_npmVersion":"6.4.0","_nodeVersion":"10.10.0","_npmUser":{"name":"evrt","email":"me@evertpot.com"},"dist":{"integrity":"sha512-QWph1UAi46Ae8mViW8BY9pmaH1zPIzTr+sAQjon4cEgbYvxbTQ3uNwJGcBEccfTJbK+fz93uMaz4mFffsrrE7A==","shasum":"5aa8b75b6d7604108a58b9bf213b0915797ef296","tarball":"https://registry.npmjs.org/@curveball/http-errors/-/http-errors-0.1.0.tgz","fileCount":7,"unpackedSize":7544,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJbl8BBCRA9TVsSAnZWagAAWskP/jj+ig2zyPXcw2tQaVcg\nmQYuMfqi4YrzRmJH4oPs3R4JWsZtEtxXep4VAXKadAJ6Robk++N4xQlIgxAB\nORGK2kLROTOFCaw+klp0gbuXAh1Fx0sxqgzBwGLbeuErwHZCHLmJleqaGRmO\n3cXFP0jVYt6x/NukptKlWE0HHSgTnrhtz+27ojvbZD5qCRn2Z9whq/5kgFHY\nUg4OU1V0Y6xUc03kpPgaIxk/lCAb3avV9NyHGcUVIPQk+qjrMl8a7hmNM6Zn\nOiIjjXtaxTttE1xXCjd6GAiBb6dUSOyv8wa3Ap2PeCV7Fzy2Z6ys0vhopL+z\nDJ+bmm30Vkch0dD4/UBfGDuMpPEaOztPMRztbT7WNtWW/Q5kGKo94s20bBzr\nf1YezoHLYyPHot5CvL/HXXrP/XbTh9D2bBIEseEhIHDgMHkClgX8LY65cjsl\nkPl3tK/isnYtkNev/6pP2YjrXH+yOHJsTIEc2w+3MXej1qglYUkkNQFzAESz\ngc/Dsj7ABlp6JLb+2NyeUw6i/pcNK4fiyV4JtWdCOIBd56d+sy0w7g3oZojF\narFEQn7dsgsynuSVPuAD8T3ITcn5/GJKkW/CZk0v882YBpY7gbgC/AZvf7WJ\n/s/OwyHL0bn++TM0QtFleb6VzJIprWWRgzk5rocbEL/4A5zzsFxWFjizQ/9c\nQd9n\r\n=kxJB\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIHHh0mmQZxajl09dYgFS6q7BAAuo5x0aDTOGktjR6fPRAiAD4nkGnwPkYLyfzEPpytXCT2ZPmEczNRMi1XBK27ROAQ=="}]},"maintainers":[{"name":"evrt","email":"me@evertpot.com"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/http-errors_0.1.0_1536671808689_0.6820834924106713"},"_hasShrinkwrap":false},"0.2.0":{"name":"@curveball/http-errors","version":"0.2.0","description":"A standard package for HTTP exceptions","main":"dist/index.js","scripts":{"prepublish":"make build","test":"make lint test","tsc":"tsc"},"repository":{"type":"git","url":"git+https://github.com/curveballjs/http-errors.git"},"keywords":["http","framework","nodejs","typescript","curveball"],"author":{"name":"Evert Pot","url":"https://evertpot.com/"},"license":"MIT","bugs":{"url":"https://github.com/curveballjs/http-errors/issues"},"homepage":"https://github.com/curveballjs/http-errors#readme","devDependencies":{"@types/chai":"^4.1.4","@types/mocha":"^5.2.3","@types/node":"^10.3.6","@types/sinon":"^5.0.1","chai":"^4.1.2","mocha":"^5.2.0","nyc":"^12.0.2","sinon":"^6.0.1","ts-node":"^7.0.0","tslint":"^5.10.0","typescript":"^2.9.2"},"types":"dist/","nyc":{"extension":[".ts"]},"gitHead":"e492bdd25cb07db1de7847acf57a7d8ec5d07933","_id":"@curveball/http-errors@0.2.0","_npmVersion":"6.4.0","_nodeVersion":"10.10.0","_npmUser":{"name":"evrt","email":"me@evertpot.com"},"dist":{"integrity":"sha512-wdQzjTE1CXL6Eg0MRsNG/NCgtEnqlBVPbxkhSzurb+p3bdbhCdZsbjlgZOT/TaROZLPVzU+XY4LMAwVOO7NBmg==","shasum":"652c05c194120dec9107e77fc57b503abd4181ea","tarball":"https://registry.npmjs.org/@curveball/http-errors/-/http-errors-0.2.0.tgz","fileCount":7,"unpackedSize":11292,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJbmN2gCRA9TVsSAnZWagAAI+EP/3XDB7BrFUSzLC6RlMeh\nUUOS1+8mR1w9vPKXWMWq+oqscdsrZ4m763y1Q0ilu+5eE03FJigtHm9j8i/N\nRFlmW11AMFjBrxtlIPpr9coPPLXzxtuOUTfBCCnZiYur/PERIKNjFixmP5o+\nE4FgwnjPPqpC2vSImTWlbFam8dzenDkhS7qbTBfoebeXrc3b1nJPZI892h4o\n0yu76W2Ds8ayWHSdK/GTaJZwmVD3k3ak2md53WWYYnH2HKExxd97JDbqvAIU\n7OxA+IXPb2HHduli+yJtwZ63JpdHX5cZXBQpHGMS+jCjl/qqwptoYSBOAU7Z\n/N45wUAACQNclIsYGKzCJqyquMxbEoGQ1ybcy1a8PMEZg0uc7tYs4nkB16Nh\nCOGyVDVarlANcjjPdqBu1ADtj9s2/gMwvocuSlqzsF0qXYgvy89O/mAGUhOR\nFQ7fXjM//5KeL5NAzuAyK5sOO5xeMT2MJtYCm8/LUfZiITKAOwjvNWnV69/h\n5tuRuorm9SkigTIA+is4eOWqaBX29prGSYAFCl405m3pGnPhQu8TZ4bpRzYG\np8fv1fYkoThYKYF6ffNtP/Bu1A4UkRfbT+0XbYizF52kfi6twiK8Vn6WAhlP\nDFd8BZ8zNhRx9PpzG1lb/9uNuXKNPnzFRi4bYwreRavX5QoiDBrFarqmQJmo\njKNA\r\n=4Sk6\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDb/jWnzhRMlZZCuNyj5WqRwFg4MBe8zvzQa6TGb4QnrwIgXHgDqTjBBm3Q0JLau/d4cS2MQv7ZvtBBVDzwBrUEjAQ="}]},"maintainers":[{"name":"evrt","email":"me@evertpot.com"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/http-errors_0.2.0_1536744863896_0.751730704458182"},"_hasShrinkwrap":false},"0.2.1":{"name":"@curveball/http-errors","version":"0.2.1","description":"A standard package for HTTP exceptions","main":"dist/index.js","scripts":{"prepublish":"make build","test":"make lint test","tsc":"tsc"},"repository":{"type":"git","url":"git+https://github.com/curveballjs/http-errors.git"},"keywords":["http","framework","nodejs","typescript","curveball"],"author":{"name":"Evert Pot","url":"https://evertpot.com/"},"license":"MIT","bugs":{"url":"https://github.com/curveballjs/http-errors/issues"},"homepage":"https://github.com/curveballjs/http-errors#readme","devDependencies":{"@types/chai":"^4.1.4","@types/mocha":"^5.2.3","@types/node":"^10.3.6","@types/sinon":"^5.0.1","chai":"^4.1.2","mocha":"^5.2.0","nyc":"^12.0.2","sinon":"^6.0.1","ts-node":"^7.0.0","tslint":"^5.10.0","typescript":"^2.9.2"},"types":"dist/","nyc":{"extension":[".ts"]},"gitHead":"69ad0f88c855faa09de049f91c30afaae34e0257","_id":"@curveball/http-errors@0.2.1","_npmVersion":"6.4.0","_nodeVersion":"10.10.0","_npmUser":{"name":"evrt","email":"me@evertpot.com"},"dist":{"integrity":"sha512-ZiulwUuBfFViZ/nCaUPRQ04sCCoPvZeh/UP5o+ysyrxd2M3KmUxySgLWbDFAJ9rAOU251JucouoPx3b/Spv34A==","shasum":"8a3b3ce069a1498f96e4edf8308ec9bd64805d09","tarball":"https://registry.npmjs.org/@curveball/http-errors/-/http-errors-0.2.1.tgz","fileCount":7,"unpackedSize":14186,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJbm4TBCRA9TVsSAnZWagAA7P8P+wfL0MpFNmn3xJgzviQs\nSDJ3JnAxR6EkqhglEE9xA2yIxLMdZyDlIKwwrs/7edhM5mnf3xdX3dHXCzcb\nhQ7+sz56TsgGXmZJGbd0mENsjyv66MueRAAWPqXnz9npYrTSkWHC9+qs04i6\nbkW5dCY4dOTWk9t7dBXY13DX0nPmJASHkdz6vEMA6bHlKwYWMcd9himnIxxQ\nTDuTxB64heqcsIWHy7h8x1Dt9wp5ZEzqFRNVqzvr4Ee/rFRzmINBqbGcFYDJ\nF4XAtnkkd/BleCiUjnPdDE2FWFeIYVDJmp5oGL4R2wRZAVKkhfa75FzqKtll\njDZGSLNmjbNhBoDMVYtbVDj2Tx9hNGJNbXrWJwXlBUBdGhzCpoW5y0aR1MAP\n/HnXC8c5rJKZN9DV7SvU8z2gsj9UHV8OuZuEEEOJSZWjvqv4Ztlz26BZGpr4\nkPFrE3hOCLN6kHnsr/4IGUam8ZcSZP3cwu3WeepEc8qBSDi/tBArtGnIY6c+\n/qYJHYW7Q+P3dvSmqINPH1fQMyeJKdj2z1Rx3aGq4SjCZoeCuVBe2Tyywsuv\nBKrM6JKRR96+Fag3M+1/x86ZgQgUMRPPkIAsjkV+feiFCVqA8FG3216/h8Dn\ns/9ElQArDpyByDxxRK4nsw4B3XV9yh3RBJI4LNd6Q7OR1fOp58Lk2jsdlbb/\nLHtl\r\n=Ceb/\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIH/wg5MH5jHekecWOVBhYuAcu/vV702uYTH+8tlg1lCfAiEAoCZprtADld2zykzyDzJwn4bjw+uBswDEKWqr9DpB+4U="}]},"maintainers":[{"name":"evrt","email":"me@evertpot.com"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/http-errors_0.2.1_1536918721023_0.19256294677904418"},"_hasShrinkwrap":false},"0.2.2":{"name":"@curveball/http-errors","version":"0.2.2","description":"A standard package for HTTP exceptions","main":"dist/index.js","scripts":{"prepublish":"make build","test":"make lint test","tsc":"tsc"},"repository":{"type":"git","url":"git+https://github.com/curveballjs/http-errors.git"},"keywords":["http","framework","nodejs","typescript","curveball"],"author":{"name":"Evert Pot","url":"https://evertpot.com/"},"license":"MIT","bugs":{"url":"https://github.com/curveballjs/http-errors/issues"},"homepage":"https://github.com/curveballjs/http-errors#readme","devDependencies":{"@types/chai":"^4.1.4","@types/mocha":"^5.2.3","@types/node":"^10.3.6","@types/sinon":"^5.0.1","chai":"^4.1.2","mocha":"^5.2.0","nyc":"^12.0.2","sinon":"^6.0.1","ts-node":"^7.0.0","tslint":"^5.10.0","typescript":"^2.9.2"},"types":"dist/","nyc":{"extension":[".ts"]},"gitHead":"e75eef23a620893c23eb8852bee9444676f3fa6e","_id":"@curveball/http-errors@0.2.2","_npmVersion":"6.4.0","_nodeVersion":"10.10.0","_npmUser":{"name":"evrt","email":"me@evertpot.com"},"dist":{"integrity":"sha512-IJ0CNEyqxWdRdFvsaOEhlICOjUuJaNrTaI034mV5PrRCPr4wlEdkiW/3QmAlVvkaf0vr1n5O3Xxr5+nMmHcj9Q==","shasum":"0a32ef66dbcd873e8d94f2f14230d978ac3fa8e1","tarball":"https://registry.npmjs.org/@curveball/http-errors/-/http-errors-0.2.2.tgz","fileCount":7,"unpackedSize":18338,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJbm6B9CRA9TVsSAnZWagAAbYEP/R6N2gy6SxIduGrZjNV4\n2H9iDDLjz6GabmY99PilJOzC7AhzS2MSklboUdcUuqgA47BFKUrI4z+oTkWy\nfG9Jtr90ziO8WzTdNxqFTUmL2YxQL+yzWkHVrtl3bqdk81TL9/ds/VkbfoUW\n/Rxbnqg4hzFY1RAN+iEYou7yp8746hlXBuFkmAwTs9HYYiPKJuv6LLqo0FKK\n7/daDc8C5nEmHCnfz9X8rPgev03DvNBOCUIi/PqPFCIsd19ZvW9u98TMWAAl\nnm32ZFdbikgDYzFmnwydSaSy8OElkMS5N9mU2sjOaRuwso1sS7fHPhXpXmBD\nge4BzJz0i4HJdESyXbBD1NdmW8fZTDPPtGatNVpd+RJGpLwS25h5nUY+qMKI\nRdXih9KmkawNqyori62eQhxYXPeWff1DMoeVAJVcUpf064hHCcrOpoolxLMQ\ntQYvVwCdB/E5lZVsX37JlBFjpV6sEaM83FU9ol3zLnD79603IhOE+6n+1Sa4\nwyKxzsaJ5k72FdsowlIjTwxddjk3mwB3sR8d4fBn99fLtTanBRRyEYnEj3Z9\naKoXJF0Pm6c6+g/Tv78iwNlJqwwa1pJnJOkhMUfe2YypGtnakufnohjzcIaL\n0rq/QT7yL8IPVlfxXyGYDgBRWlae0pSuQFtjEF/a4VhNQfkh0qHnWjbI657Y\nAbPV\r\n=EESO\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIH95JDlju3hWsm4g5EvqRKZ14FDBtdwqLuuLqDj+Z6+AAiBYA8oWuJG2GEtBChPHkJbA7BbDWRqdGZDCLJ1qPA2xLA=="}]},"maintainers":[{"name":"evrt","email":"me@evertpot.com"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/http-errors_0.2.2_1536925821079_0.0031460615814353776"},"_hasShrinkwrap":false},"0.3.0":{"name":"@curveball/http-errors","version":"0.3.0","description":"A standard package for HTTP exceptions","main":"dist/index.js","scripts":{"prepublish":"make build","test":"make lint test","tsc":"tsc"},"repository":{"type":"git","url":"git+https://github.com/curveballjs/http-errors.git"},"keywords":["http","framework","nodejs","typescript","curveball"],"author":{"name":"Evert Pot","url":"https://evertpot.com/"},"license":"MIT","bugs":{"url":"https://github.com/curveballjs/http-errors/issues"},"homepage":"https://github.com/curveballjs/http-errors#readme","devDependencies":{"@types/chai":"^4.1.4","@types/mocha":"^5.2.3","@types/node":"^10.3.6","@types/sinon":"^5.0.1","chai":"^4.1.2","mocha":"^5.2.0","nyc":"^12.0.2","sinon":"^6.0.1","ts-node":"^7.0.0","tslint":"^5.10.0","typescript":"^2.9.2"},"types":"dist/","nyc":{"extension":[".ts"]},"gitHead":"ac7a9b52b83dc0cd584db5a1acba445874504f46","_id":"@curveball/http-errors@0.3.0","_npmVersion":"6.4.1","_nodeVersion":"10.11.0","_npmUser":{"name":"evrt","email":"me@evertpot.com"},"dist":{"integrity":"sha512-sCx/u8xFxlp/6tbhgCYXJDNLtUbxx3OYE5+jITyTiJhLCTopU5akF2eYlrwgxGtEi+tB8/JlCz0322YV4L6Daw==","shasum":"6e478ea32a7329df545f6d364f31e30b4c7839ea","tarball":"https://registry.npmjs.org/@curveball/http-errors/-/http-errors-0.3.0.tgz","fileCount":7,"unpackedSize":38576,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJbsqdyCRA9TVsSAnZWagAAAxUP/29g5Nw1VgRf6D2D2yn1\n5xlnuxFNZdxX+sFVVpK67SuDjUdHzfM42fNN4iU82oc8P14Q0qmoGKV9Ge9t\nmMJ2BuAFKO12enx4BAusnmedWRCyBby5LTqKzXeneQCIWcFHLtENMim+GaRE\n6c8jP2rDQeQkHmlCA3NRZJ2BgpABgI5CHlLnnfNKoM9HEkYdzmxlJOT6VGm3\nLj9FmpQGFoZ8DNfJShfOrp0fRSS9AhCwKJurYIVwMzLAbfVh41sdotP91V75\nG7PpKcyDrZ7nDs28eIs8d2sQi/6tG5Pjblv/lQqcCpT0MAWNRX0jt60tEW22\nKNddzC3ZaSD7CMNFcovBB/JW7eFTiKuO7VzEKcB0R5Ea/QCTQ++VE/cUp4Aj\nAPUMn1G5iALaMAyanOLJcLrkp2NA1lJRJ/oBaQBmbh+69vBYC1EO2VCfkLB1\nrN7rOf9ydzMLssjRYQe9r/Jqdnz8vEKythDbVWDhkOCrY1/IHZLwkD8c5WQ5\nY0yv0Ruvh9j39wQMu18CPuTtyuX20kj2NEtoUtZ59yNnbz0pHtQ9vQlBwtA5\n09C6CE5Io5NOf+EE+4JX4v5ft1OhnuMQZ921yF7VU4KsO8gNTCUwcZA904gP\nmeMjWd4mg+/NfKHZIVeJ4YbrXPN0URqAG1AZGvwJAjFDyONI79sdysgIqSXN\nMd+4\r\n=1aEv\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIA9CdMnoRrFOuuYXG4YyS8ciqoKRFqmJOT0Y5llIohNnAiEA5EOwgd5H8vedcNRIVyrrQcAywKHjH2P1lmbVW6HHZKo="}]},"maintainers":[{"name":"evrt","email":"me@evertpot.com"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/http-errors_0.3.0_1538434929221_0.9786186940288468"},"_hasShrinkwrap":false},"0.4.0":{"name":"@curveball/http-errors","version":"0.4.0","description":"A standard package for HTTP exceptions","main":"dist/index.js","scripts":{"prepublish":"make build","test":"make lint test","tsc":"tsc"},"repository":{"type":"git","url":"git+https://github.com/curveball/http-errors.git"},"keywords":["http","framework","nodejs","typescript","curveball"],"author":{"name":"Evert Pot","url":"https://evertpot.com/"},"license":"MIT","bugs":{"url":"https://github.com/curveball/http-errors/issues"},"homepage":"https://github.com/curveball/http-errors#readme","devDependencies":{"@types/chai":"^4.2.12","@types/mocha":"^8.0.3","@types/node":"^10.17.35","@types/sinon":"^9.0.7","@typescript-eslint/eslint-plugin":"^4.3.0","@typescript-eslint/parser":"^4.3.0","chai":"^4.2.0","eslint":"^7.10.0","mocha":"^8.1.3","nyc":"^15.1.0","sinon":"^9.1.0","ts-node":"^9.0.0","typescript":"^4.0.3"},"types":"dist/","nyc":{"extension":[".ts"]},"mocha":{"require":"ts-node/register","recursive":true,"extension":["ts","js","tsx"]},"gitHead":"6b1117bab0b24f6a5199a9d22eca0f3c3b4ad435","_id":"@curveball/http-errors@0.4.0","_nodeVersion":"12.20.1","_npmVersion":"6.14.10","dist":{"integrity":"sha512-lhOjdu2P4YEl9Ab/gD/Ikf9Fi6/kGU1slne5v401o3Y7fZl8pWUc/kya3wc3OxzzJlwHgRGySgDEdPPZLJaCWg==","shasum":"2ab15cafc3d07e649fa8fc870af4c55081c2a8de","tarball":"https://registry.npmjs.org/@curveball/http-errors/-/http-errors-0.4.0.tgz","fileCount":8,"unpackedSize":40385,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgLvmOCRA9TVsSAnZWagAAIbQP/2aZt2d+5PWpqzHHH92t\nr4F10bgiMZJgMIgtMzF800PC2jA2kWT8dViwhljs861577Dm6UgIcqPwFhfb\nQ5Ev9AE+M1Ju3nJwqJp/ofyZkIwCCtPHZZyTd5m9iSwdVlPeqiNs6dfQw/CN\nFKuJ1DbsM9baXNhHgmyELZy6Xtz4ms8D4McaBW3dNffAnZ5FpA3eGAL9uywi\n+hCsza5l2guktNdPDvTtUIm3XQvVjj4ydJaLV9lgYT1xB94Wj1y0OHdZDBSa\nr4tH36Hj1leB7tkD2j7GWwUiLM6fpEnQRIj0VaL6Cen5w5+vGppGXQvehLYs\nunI2kKTmjxzOmJ3p/cvp9iP59fnHZaVp9gpeFEZqpFBxd1zyfboE5F/c4yx1\nyyp0JzWyPSW9zqIxY54a3gb86mV+Rn2tS/wL9IBY4WjdHCdPzXPKXxEf16Fq\n6ChMjBvPWK+laWEjtWJdiE6vTENXeut8erSzgWoPjavAjdB1/Qa6BvEkN/VQ\n3Zy7cYjgls1zzoEwsiKASj3DKedXYdjV2wXsC3KyT1Zgsq1ppNvMjhab8+JM\nTiNBttGWLZpcQeMKBja6LKtpgcUWDnCFVYDfr/PlK4rUp5amkxkD1TClbV5j\nfPRieNCbe5uDZ5Tixqcmyj+Jtt7YxconXXlWtbCE3LIepC4ZMrBQSHm1GAi/\nV9I6\r\n=YwYO\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIHgj8/G9QwokW5A4q9r3B0z9cbArJtI3MDO9Y9b+u5lGAiAUEFr6xcpRrjai1RQ1DwKSfWVhNkIVqrV8acTZxgK6zA=="}]},"_npmUser":{"name":"evrt","email":"me@evertpot.com"},"directories":{},"maintainers":[{"name":"evrt","email":"me@evertpot.com"},{"name":"mihok","email":"4d.69.68.6f.6b@gmail.com"},{"name":"juhangsin","email":"juhangsin@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/http-errors_0.4.0_1613691277598_0.08640063309651103"},"_hasShrinkwrap":false},"0.4.1":{"name":"@curveball/http-errors","version":"0.4.1","description":"A standard package for HTTP exceptions","main":"dist/index.js","scripts":{"prepublish":"make build","test":"make lint test","tsc":"tsc"},"repository":{"type":"git","url":"git+https://github.com/curveball/http-errors.git"},"keywords":["http","framework","nodejs","typescript","curveball"],"author":{"name":"Evert Pot","url":"https://evertpot.com/"},"license":"MIT","bugs":{"url":"https://github.com/curveball/http-errors/issues"},"homepage":"https://github.com/curveball/http-errors#readme","devDependencies":{"@types/chai":"^4.2.12","@types/mocha":"^9.0.0","@types/node":"^12.20.41","@types/sinon":"^10.0.6","@typescript-eslint/eslint-plugin":"^5.9.1","@typescript-eslint/parser":"^5.9.1","chai":"^4.2.0","eslint":"^8.6.0","mocha":"^9.1.4","nyc":"^15.1.0","sinon":"^12.0.1","ts-node":"^10.4.0","typescript":"^4.5.4"},"types":"dist/","nyc":{"extension":[".ts"]},"mocha":{"require":"ts-node/register","recursive":true,"extension":["ts","js","tsx"]},"gitHead":"516e158eee14636ca0565fc5403228dfa7315751","_id":"@curveball/http-errors@0.4.1","_nodeVersion":"12.22.9","_npmVersion":"6.14.15","dist":{"integrity":"sha512-RJe0IOQQpgvCwUY8ZKK7/YgfWi1MqMzMrIHilwXHaMFykoVjpRNzaeO3FmrKSUlmJSb6vuPd37LEPNUne4PxZA==","shasum":"00869654267de01f04d90cb884c375bb2bb65441","tarball":"https://registry.npmjs.org/@curveball/http-errors/-/http-errors-0.4.1.tgz","fileCount":8,"unpackedSize":40823,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJh40QOCRA9TVsSAnZWagAAwTkQAIOGNDO9Cv1SuesZyFmk\n2JsmHO391dH7KltKMcxs4oEjQ35CQmmkrXkbXqc/i7LzKFd+7fWXlcHEpKTU\n67pRBUCpTJCR8BjTSHON3NBVQCe5w1top43vgv4OzeSBgF0xVVfWZX46NwrJ\nJvbA0NVJyq1sPU9yXTbHBFDd9UvRCP7CIfrfMeLD36KeIwYP0MtnxHjiWa76\np4fAzaY1AkHjdtvQ96dHFbXMkvEyoSSHFnv1hxHbXPTiYE0zYewGfB3VS/Jy\nteufbD1+eqd2JSz6pjEKbvDtHSbW3arhVAvNMsSsDP93BIqdROqxioIJxOf2\nD7zSTR6GCEacBQyXdMGBYFPxRAfjMZvA0otP+ZWZNa/FtKTt7EBjFaejXS15\nRE8R46XBW0AJ+i57RlVeyOIdUDCBm+y+P5W4K2jDmdGZJFbLHaFeiZDo6oZ5\nfolxoHwRJzPlxnrJkCorClONdQ2BCC/yYWiNuGkAI4gZ2e/zUIAaiFTYkwVK\nBTfcEdXX4m/GWSebCFR+4DDaIBzM5EOSfh+K1hmQ5CDzQCYp9dseCw5GeNkL\njc1I3n1mF1t6s0VzLQhJF2SODCiZOqg2knuJZfuyXQ+OjLnVSEGuTkmA177l\nfpTrtBugESWp/fdMQVi+0JgKRWfmmTUbBou2rhxtX7Jt+uPl2p4po3z9ROq4\nk4OY\r\n=F62k\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIA+l4M9yutHqom8vF0+aEv2nAD3JFtNCJdb/UArKETuTAiBj1erdyoDuBPDc7M5wUdqN4ZeEt1JfOC3PN/jJW5UtZw=="}]},"_npmUser":{"name":"evrt","email":"me@evertpot.com"},"directories":{},"maintainers":[{"name":"evrt","email":"me@evertpot.com"},{"name":"mihok","email":"4d.69.68.6f.6b@gmail.com"},{"name":"juhangsin","email":"juhangsin@gmail.com"},{"name":"beckypollard","email":"hello@beckypollard.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/http-errors_0.4.1_1642284046458_0.16304008474680498"},"_hasShrinkwrap":false},"0.5.0":{"name":"@curveball/http-errors","version":"0.5.0","description":"A standard package for HTTP exceptions","type":"module","exports":{"require":"./cjs/index.js","import":"./esm/index.js"},"main":"cjs/index.js","homepage":"https://github.com/curveball/http-errors#readme","bugs":{"url":"https://github.com/curveball/http-errors/issues"},"keywords":["http","framework","nodejs","typescript","curveball"],"author":{"name":"Evert Pot","url":"https://evertpot.com/"},"license":"MIT","scripts":{"prepublishOnly":"make build","test":"make test","lint":"make lint","fix":"make fix","tsc":"tsc","start":"make start"},"repository":{"type":"git","url":"git+https://github.com/curveball/http-errors.git"},"devDependencies":{"@types/chai":"^4.2.12","@types/mocha":"^10.0.1","@types/node":"^12.20.41","@types/sinon":"^10.0.6","@typescript-eslint/eslint-plugin":"^5.9.1","@typescript-eslint/parser":"^5.9.1","chai":"^4.2.0","eslint":"^8.6.0","mocha":"^10.2.0","nyc":"^15.1.0","sinon":"^15.0.1","ts-node":"^10.4.0","typescript":"^4.5.4"},"engines":{"node":">= 14.4"},"mocha":{"loader":["ts-node/esm"],"recursive":true,"extension":["ts","js","tsx"]},"nyc":{"extension":[".ts"]},"types":"./cjs/index.d.ts","gitHead":"31a58a2cac877659c5775028af46ec29b44bddb3","_id":"@curveball/http-errors@0.5.0","_nodeVersion":"16.19.0","_npmVersion":"8.19.3","dist":{"integrity":"sha512-aZ+l+BME9+BQwq3Mc+j9nal9D9lThubCRdirZYSjEuCn1Gc+lpsx1ETlvZ508Ac7ZleK7Zhg18TewOioRCk0Ew==","shasum":"7c2ccf3b912a72563040b2d0d8ad1b61e1304d56","tarball":"https://registry.npmjs.org/@curveball/http-errors/-/http-errors-0.5.0.tgz","fileCount":14,"unpackedSize":75792,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIEgn2HGLmDtDe/o1XcPugAdFrGxzOkUIPfLVqkd8MU5iAiEAxVSNa0icXusjFYqTLnzDiGZKDbfD0GjCv13i3AeHkmw="}],"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJj6vHrACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmpmnBAAjQJ69rONj3/YBIrRB7CB+S3QhQxeIB6rVOMxm4cvZTZCHv39\r\nPgOdDP1XrlxNGYkbT1Tz7nLExiEtfQLr7IeyjGvVePQQB4+VHoge7EIiUlc7\r\n4xZkFjPNhkSDws3nw/u9qL139Q5Z+4ep2z9ef/gR08QILJR6bAXYBj95vfsV\r\nL+Ja+CvGh+6+5ibUuKshYxKr7uO+JN0/cRb51++6PnY2wQhhlC4HhfrxKE9h\r\nh5IcUNCstnG0hCsiMxkwCaUkK+LuP6ouxMxHgcJUGzbJbwFQULIzUKRxXGU2\r\nz0GVTqs7Bf9Te/FdYproL0ck0ykZt8HoD/I3hfeMBGIB3dLtvM3AeY4aY3q7\r\nsXcFvSV/C3tnfUf/3klcwvIO7+iA7pG7957vo63tZ7Nlhbp3sDe9bc7cfb3D\r\nwi6wTInHt9emwhcXUVH6mWwZAzsEQmaZO/wkuX+fVN3k04zuXU/hbCFjWmbG\r\nNeGxnO1AfcatpKANLdrGng+gi8ucM7mHp0Gxkjt4Yn34++qyDUsZfRgv+Td1\r\na5b1jgs7ULfou8ClnbZVi1G713irI2h1zKOMQzstIzzkJA9JcquuezbYPZrn\r\n6Ed4ugh60GnCA8GOkh7OVNtYrFsBgdExysf7LojGCKXEJbFB97W7nx+KiLKy\r\nMyWSu99r9q17NNza16ZYZ/02XOInxWPQesk=\r\n=jLOX\r\n-----END PGP SIGNATURE-----\r\n"},"_npmUser":{"name":"evrt","email":"me@evertpot.com"},"directories":{},"maintainers":[{"name":"evrt","email":"me@evertpot.com"},{"name":"mihok","email":"4d.69.68.6f.6b@gmail.com"},{"name":"juhangsin","email":"juhangsin@gmail.com"},{"name":"beckypollard","email":"hello@beckypollard.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/http-errors_0.5.0_1676341739631_0.3540267788433695"},"_hasShrinkwrap":false},"1.0.0":{"name":"@curveball/http-errors","version":"1.0.0","description":"A standard package for HTTP exceptions","type":"module","exports":"./dist/index.js","homepage":"https://github.com/curveball/http-errors#readme","bugs":{"url":"https://github.com/curveball/http-errors/issues"},"keywords":["http","framework","nodejs","typescript","curveball"],"author":{"name":"Evert Pot","url":"https://evertpot.com/"},"license":"MIT","scripts":{"prepublishOnly":"make build","test":"make test","lint":"make lint","fix":"make fix","tsc":"tsc","start":"make start","build":"make build"},"repository":{"type":"git","url":"git+https://github.com/curveball/http-errors.git"},"peerDependencies":{"@curveball/kernel":"^1"},"devDependencies":{"@curveball/kernel":"^1.0.0","@types/chai":"^4.2.12","@types/mocha":"^10.0.1","@types/node":"^18.19.7","@types/sinon":"^17.0.3","@typescript-eslint/eslint-plugin":"^6.19.0","@typescript-eslint/parser":"^6.19.0","chai":"^5.0.0","eslint":"^8.6.0","mocha":"^10.2.0","nyc":"^15.1.0","sinon":"^17.0.1","ts-node":"^10.4.0","typescript":"^5.3.3"},"engines":{"node":">= 18"},"mocha":{"loader":["ts-node/esm"],"recursive":true,"extension":["ts","js","tsx"]},"nyc":{"extension":[".ts"]},"_id":"@curveball/http-errors@1.0.0","gitHead":"df13679d217cc6f315819ea67367b993ed60e0f9","_nodeVersion":"18.19.0","_npmVersion":"10.2.3","dist":{"integrity":"sha512-S7gB1Ibj37YhQtEuRfnLkDkN7aCubfXaB8/dBMnH7wRKOBJIYBN4XJrzu42Z2oHXjINHbkxqiHJ0R5V0i0hNJg==","shasum":"9875064c0b1e4333b0b28df14a3b3246d79639ec","tarball":"https://registry.npmjs.org/@curveball/http-errors/-/http-errors-1.0.0.tgz","fileCount":8,"unpackedSize":44568,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIBaslom3teVWmcwrRkxPpJrqrUTh/Q7zRT3FZygiz9xQAiBEa3UNH1sG0YzdxpQKuf8NmCE7d5oKAg0HBmdiO2IqZA=="}]},"_npmUser":{"name":"evrt","email":"me@evertpot.com"},"directories":{},"maintainers":[{"name":"evrt","email":"me@evertpot.com"},{"name":"mihok","email":"4d.69.68.6f.6b@gmail.com"},{"name":"juhangsin","email":"juhangsin@gmail.com"},{"name":"beckypollard","email":"hello@beckypollard.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/http-errors_1.0.0_1705361128653_0.673063437552361"},"_hasShrinkwrap":false},"1.0.1":{"name":"@curveball/http-errors","version":"1.0.1","description":"A standard package for HTTP exceptions","type":"module","exports":"./dist/index.js","homepage":"https://github.com/curveball/http-errors#readme","bugs":{"url":"https://github.com/curveball/http-errors/issues"},"keywords":["http","framework","nodejs","typescript","curveball"],"author":{"name":"Evert Pot","url":"https://evertpot.com/"},"license":"MIT","scripts":{"prepublishOnly":"make build","test":"make test","lint":"make lint","fix":"make fix","tsc":"tsc","start":"make start","build":"make build"},"repository":{"type":"git","url":"git+https://github.com/curveball/http-errors.git"},"devDependencies":{"@curveball/kernel":"^1.0.0","@types/chai":"^4.2.12","@types/mocha":"^10.0.1","@types/node":"^18.19.7","@types/sinon":"^17.0.3","@typescript-eslint/eslint-plugin":"^6.19.0","@typescript-eslint/parser":"^6.19.0","chai":"^5.0.0","eslint":"^8.6.0","mocha":"^10.2.0","nyc":"^15.1.0","sinon":"^17.0.1","ts-node":"^10.4.0","typescript":"^5.3.3"},"engines":{"node":">= 18"},"mocha":{"loader":["ts-node/esm"],"recursive":true,"extension":["ts","js","tsx"]},"nyc":{"extension":[".ts"]},"_id":"@curveball/http-errors@1.0.1","gitHead":"6fc273b4728a9f15b8e55aedc6ca649cb29b2228","_nodeVersion":"18.19.0","_npmVersion":"10.2.3","dist":{"integrity":"sha512-ATzRnOBcNCMqD1hkSk5Aa1xBQKlatN4lGZr2IRyqzJqr798GpibFLPwhSHaZLQICA8MHIIHjfFNMFpMzCDSyXw==","shasum":"a9cc745872b5f25bd58cd88c3871bd44167d49a7","tarball":"https://registry.npmjs.org/@curveball/http-errors/-/http-errors-1.0.1.tgz","fileCount":8,"unpackedSize":44509,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDT05VYpzD40IEOX2P2RyUl00O1G+FeMcrPlLFZ+ADKlgIgVQfkrG6BkJTgCMZsexIwjRflU0ifIDazY8bOU/vzpF4="}]},"_npmUser":{"name":"evrt","email":"me@evertpot.com"},"directories":{},"maintainers":[{"name":"evrt","email":"me@evertpot.com"},{"name":"mihok","email":"4d.69.68.6f.6b@gmail.com"},{"name":"juhangsin","email":"juhangsin@gmail.com"},{"name":"beckypollard","email":"hello@beckypollard.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/http-errors_1.0.1_1705733594884_0.17201475814788791"},"_hasShrinkwrap":false}},"time":{"created":"2018-09-11T12:18:49.861Z","0.0.1":"2018-09-11T12:18:50.070Z","modified":"2024-01-20T06:53:15.307Z","0.1.0":"2018-09-11T13:16:48.796Z","0.2.0":"2018-09-12T09:34:24.005Z","0.2.1":"2018-09-14T09:52:01.171Z","0.2.2":"2018-09-14T11:50:21.220Z","0.3.0":"2018-10-01T23:02:09.346Z","0.4.0":"2021-02-18T23:34:37.769Z","0.4.1":"2022-01-15T22:00:46.676Z","0.5.0":"2023-02-14T02:28:59.791Z","1.0.0":"2024-01-15T23:25:28.829Z","1.0.1":"2024-01-20T06:53:15.062Z"},"maintainers":[{"name":"evrt","email":"me@evertpot.com"},{"name":"mihok","email":"4d.69.68.6f.6b@gmail.com"},{"name":"juhangsin","email":"juhangsin@gmail.com"},{"name":"beckypollard","email":"hello@beckypollard.com"}],"description":"A standard package for HTTP exceptions","homepage":"https://github.com/curveball/http-errors#readme","keywords":["http","framework","nodejs","typescript","curveball"],"repository":{"type":"git","url":"git+https://github.com/curveball/http-errors.git"},"author":{"name":"Evert Pot","url":"https://evertpot.com/"},"bugs":{"url":"https://github.com/curveball/http-errors/issues"},"license":"MIT","readme":"HTTP Errors\n===========\n\nThis package contains a list of standard HTTP exceptions for Typescript. They\ncan be emitted from a Node.js web application written in for example [Koa][2]\nor [Curveball][1], or they can be re-used in a HTTP client.\n\nThis package exists because I often find myself re-writing errors such as:\n\n```typescript\nclass NotFound extends Error {\n  const httpStatus = 404;\n}\n```\n\nInstead of doing this over an over again for every client and server-sideproject,\nit made more sense to be to create 1 generic package that I can re-use for every\nproject I'm working on.\n\nI had trouble finding something similar on NPM, so I hope this is useful to\nothers.\n\nThis package has 0 dependencies and is not a part of any frameworks. Someone\ncould use this package and integrate it into their own frameworks as a\nmiddleware.\n\nThe hope is that as long as this package is independent, it could be used by\nlibrary authors to throw generic errors with HTTP error information.\n\n\nInstallation\n------------\n\n    npm install @curveball/http-errors\n\n\nGetting started\n---------------\n\nAfter installing the NPM package, you can very easily reference all the\nexceptions contained within:\n\n```typescript\nimport { NotFound, Forbidden } from '@curveball/http-errors';\n\nthrow new NotFound('Article not found');\n```\n\nThis also works fine with plain javascript:\n\n```javascript\nconst { NotFound, Forbidden } = require('@curveball/http-errors');\nthrow new Forbidden('You\\'re not allowed to update this article');\n```\n\n\nThe library also ships with a simple utility function to see if _any_ error has\nHTTP error information:\n\n```typescript\nimport { isHttpError } from '@curveball/http-errors';\n\nconst myError = new Error('Custom error');\nmyError.httpStatus = 500;\n\nconsole.log(isHttpError(myError));\n```\n\nThe idea is that as long as libraries follow this pattern, they don't need to\ndepend on this library but they can be used automatically by middlewares.\n\n\nBuilt-in Error classes such as `NotFound`, `Unauthorized`, all have a `title`\nproperty with the default HTTP error string.\n\n```typescript\nconst myError = new MethodNotAllowed('I can\\'t believe youi\\'ve done this');\nconsole.log(myError.title); // Emits \"Method Not Allowed\"\n```\n\nIt also has a utility function to see if something was a Client or Server error:\n\n```typescript\nimport { BadRequest, isServerError, isClientError } from '@curveball/http-errors';\n\nconst myError = new BadRequest('I didn\\'t understand it');\nconsole.log(isClientError(e)); // true\nconsole.log(isServerError(e)); // false\n```\n\nLastly, a few HTTP responses require or suggest including extra HTTP headers with\nmore information about the error. For example, the `405 Method Not Allowed`\nresponse should include an `Allow` header, and the `503 Service Unavailable`\nshould have a `Retry-After` header. The built-in error classes include support\nthese:\n\n```typescript\nimport { MethodNotAllowed, ServiceUnavailable } from '@curveball/http-errors';\n\ntry {\n  throw new MethodNotAllowed('Not allowed', ['GET', 'PUT']);\n} catch (e) {\n  console.log(e.allow);\n}\n\ntry {\n  throw new ServiceUnavailable('Not open on sundays', 3600*24);\n} catch (e) {\n  console.log(e.retryAfter);\n}\n```\n\nLastly, it the package has an interface that makes it easier to work with the\n`application/problem+json` format, as defined in [RFC9457][3]. The interface\nhas `type`, `title`, `detail` and `instance` properties, which makes it easier\nto write a generic interface that emits this JSON error format.\n\nAPI\n---\n\n```typescript\nexport function isHttpError(e: Error): e is HttpError;\nexport function isHttpProblem(e: Error): e is HttpProblem;\nexport function isClientError(e: Error): boolean;\nexport function isServerError(e: Error): boolean;\n\nexport interface HttpError extends Error {\n  httpStatus: number;\n}\n\nexport interface HttpProblem extends HttpError {\n\n  type: string | null;\n  title: string;\n  detail: string | null;\n  instance: string | null;\n\n}\n\nexport class HttpErrorBase extends Error implements HttpProblem {\n\n  type: string | null = null;\n  httpStatus: number = 500;\n  title: string = 'Internal Server Error';\n  detail: string|null = null;\n  instance: string | null = null;\n\n  constructor(detail: string|null = null) { }\n\n}\n\nexport class BadRequest extends HttpErrorBase { }\n\ntype AuthenticateChallenge = string | string[];\n\nexport class Unauthorized extends HttpErrorBase {\n  wwwAuthenticate: AuthenticateChallenge;\n  constructor(detail: string|null = null, wwwAuthenticate?: AuthenticateChallenge) {}\n}\n\nexport class PaymentRequired extends HttpErrorBase {}\nexport class Forbidden extends HttpErrorBase {}\nexport class NotFound extends HttpErrorBase {}\n\nexport class MethodNotAllowed extends HttpErrorBase {\n  allow: string[]\n  constructor(detail: string|null = null, allow?: string[]) {}\n}\n\nexport class NotAcceptable extends HttpErrorBase {}\n\nexport class ProxyAuthenticationRequired extends HttpErrorBase {\n  proxyAuthenticate: AuthenticateChallenge;\n  constructor(detail: string|null = null, proxyAuthenticate?: AuthenticateChallenge) {}\n}\n\nexport class RequestTimeout extends HttpErrorBase {}\nexport class Conflict extends HttpErrorBase {}\nexport class Gone extends HttpErrorBase {}\nexport class LengthRequired extends HttpErrorBase {}\nexport class PreconditionFailed extends HttpErrorBase {}\n\nexport class ContentTooLarge extends HttpErrorBase {\n  retryAfter: number | null;\n  constructor(detail: string|null = null, retryAfter: number|null = null) {}\n}\n\nexport class UriTooLong extends HttpErrorBase { }\nexport class UnsupportedMediaType extends HttpErrorBase {}\nexport class RangeNotSatisfiable extends HttpErrorBase {}\nexport class ExpectationFailed extends HttpErrorBase {}\nexport class MisdirectedRequest extends HttpErrorBase {}\nexport class UnprocessableContent extends HttpErrorBase {}\nexport class Locked extends HttpErrorBase {}\nexport class FailedDependency extends HttpErrorBase {}\nexport class TooEarly extends HttpErrorBase {}\nexport class UpgradeRequired extends HttpErrorBase {}\nexport class PreconditionRequired extends HttpErrorBase {}\n\nexport class TooManyRequests extends HttpErrorBase {\n  retryAfter: number | null;\n  constructor(detail: string|null = null, retryAfter: number|null = null) {}\n}\n\nexport class RequestHeaderFieldsTooLarge extends HttpErrorBase {}\nexport class UnavailableForLegalReasons extends HttpErrorBase {}\nexport class InternalServerError  extends HttpErrorBase {}\nexport class NotImplemented extends HttpErrorBase {}\nexport class BadGateway extends HttpErrorBase {}\n\nexport class ServiceUnavailable extends HttpErrorBase {\n  retryAfter: number | null;\n  constructor(detail: string|null = null, retryAfter: number|null = null) {}\n}\n\nexport class GatewayTimeout extends HttpErrorBase {}\nexport class HttpVersionNotSupported extends HttpErrorBase {}\nexport class VariantAlsoNegotiates extends HttpErrorBase {}\nexport class UnsufficientStorage extends HttpErrorBase {}\nexport class LoopDetected extends HttpErrorBase {}\nexport class NetworkAuthenticationRequired extends HttpErrorBase {}\n```\n\n...\n\n[1]: https://github.com/curveball/\n[2]: http://koajs.com/\n[3]: https://tools.ietf.org/html/rfc9457\n","readmeFilename":"README.md"}