Use correct constructor for 404,501 error handlers

Fixes error message mentioned in #4378.
pull/4441/head
Viljami Kuosmanen 2020-10-25 11:38:49 +01:00 committed by John McLear
parent 5a1110d0d6
commit aef4cce0c9
1 changed files with 2 additions and 2 deletions

View File

@ -575,10 +575,10 @@ exports.expressCreateServer = (hookName, args, cb) => {
// register default handlers
api.register({
notFound: () => {
throw new createHTTPError.notFound('no such function');
throw new createHTTPError.NotFound('no such function');
},
notImplemented: () => {
throw new createHTTPError.notImplemented('function not implemented');
throw new createHTTPError.NotImplemented('function not implemented');
},
});