Use correct constructor for 404,501 error handlers

Fixes error message mentioned in #4378.
This commit is contained in:
Viljami Kuosmanen 2020-10-25 11:38:49 +01:00 committed by John McLear
parent 5a1110d0d6
commit aef4cce0c9

View file

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