Skip to content

Commit c3b77ce

Browse files
committed
add 404 error type
1 parent 2ddf170 commit c3b77ce

3 files changed

Lines changed: 8 additions & 5 deletions

File tree

component.json

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "custom-errors",
3-
"version": "1.5.1",
3+
"version": "1.6.0",
44
"license": "MIT",
55
"description": "custom error classes optimised for error logging",
66
"keywords": [
@@ -9,10 +9,12 @@
99
"custom-errors"
1010
],
1111
"repo": "techjacker/custom-errors",
12-
"main": "index.js",
12+
"main": "lib/main.js",
1313
"dependencies": {},
1414
"scripts": [
15-
"index.js",
16-
"lib/main.js"
15+
"lib/main.js",
16+
"lib/abstract-error.js",
17+
"lib/validation-error.js",
18+
"lib/error-factory.js"
1719
]
1820
}

lib/main.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@ module.exports = {
1414
request: {
1515
BadRequest: errFactory('BadRequest', 'warning', 400),
1616
Unauthorized: errFactory('Unauthorized', 'warning', 401),
17+
NotFound: errFactory('NotFound', 'warning', 404),
1718
Forbidden: errFactory('Forbidden', 'warning', 403),
1819
NotAcceptable: errFactory('Not Acceptable', 'warning', 406)
1920
}

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "custom-errors",
3-
"version": "1.5.1",
3+
"version": "1.6.0",
44
"license": "MIT",
55
"description": "custom error classes optimised for error logging",
66
"tags": [

0 commit comments

Comments
 (0)