Return 404 if resource is not found.

This commit is contained in:
Spencer Ofwiti 2021-06-28 10:26:09 +03:00
parent 1d0eb06f2f
commit 4be0b9d3ae

View File

@ -205,7 +205,7 @@ async function processRequest(req, res) {
if (content === undefined) { if (content === undefined) {
console.error('empty content', data); console.error('empty content', data);
res.writeHead(400, {"Content-Type": "text/plain"}); res.writeHead(404, {"Content-Type": "text/plain"});
res.end(); res.end();
return; return;
} }