respond with proper error page when the /s/:id sku fails

This commit is contained in:
Sören Oesterwind 2023-07-09 18:14:29 +02:00
parent 5524f14e1a
commit 720a969484

View File

@ -29,7 +29,9 @@ function get(req: Request, res: Response) {
res.send(html); res.send(html);
}); });
} else { } else {
res.send('Item not found'); Eta.renderFile(__path + '/src/frontend/errors/404.eta.html', item).then((html) => {
res.status(404).send(html);
});
} }
}); });
} }