From 83b3de284c2a4313655c1ee6157cc7ff82854dbe Mon Sep 17 00:00:00 2001 From: "Alexander \"Arav\" Andreev" Date: Wed, 9 Jun 2021 23:20:49 +0400 Subject: [PATCH] Proper return of a 404 response code. --- homepage/index.js | 1 + 1 file changed, 1 insertion(+) diff --git a/homepage/index.js b/homepage/index.js index 3e9c602..8d43efc 100644 --- a/homepage/index.js +++ b/homepage/index.js @@ -147,6 +147,7 @@ app await next(); if (ctx.status === 404) ctx.throw(404); } catch (err) { + ctx.status = err.status || 500; if (ctx.status === 404) await ctx.render('404'); else