aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/config/notFoundHandler.ts8
1 files changed, 8 insertions, 0 deletions
diff --git a/src/config/notFoundHandler.ts b/src/config/notFoundHandler.ts
new file mode 100644
index 0000000..8fb11d6
--- /dev/null
+++ b/src/config/notFoundHandler.ts
@@ -0,0 +1,8 @@
+import { RequestHandler } from "express";
+import createHttpError from "http-errors";
+
+const notFoundHandler: RequestHandler = (req, res, next) => {
+ return next(createHttpError.NotFound());
+};
+
+export default notFoundHandler;