From 940384774aa0d257be94a2031de188df5ad8bdd1 Mon Sep 17 00:00:00 2001 From: Ladd Hoffman Date: Thu, 4 Apr 2024 12:55:59 -0500 Subject: [PATCH] trivial change to 404 handling --- backend/index.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/backend/index.js b/backend/index.js index 8d80c02..7b111fa 100644 --- a/backend/index.js +++ b/backend/index.js @@ -100,8 +100,8 @@ app.get('/read/:hash', async (req, res) => { }); app.get('*', (req, res) => { - console.log(`req.path: ${req.path}`); - res.send('Hello World!'); + console.log(`404 req.path: ${req.path}`); + res.status(404).json({ errorCode: 404 }); }); app.listen(port, () => {