From c8838d617528440ae9a5c3a38c6224592498e1cd Mon Sep 17 00:00:00 2001 From: Bilal Bassam Date: Sun, 15 Mar 2026 23:59:19 +0300 Subject: [PATCH] feat: more elaborate error messages Disambiguates which route handler caused the error, especially useful when there are a ton of registered routes that could've triggered the error, since this can't be handled through a middleware. --- libs/weblit-server.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libs/weblit-server.lua b/libs/weblit-server.lua index 93118df..e255ba8 100644 --- a/libs/weblit-server.lua +++ b/libs/weblit-server.lua @@ -87,7 +87,7 @@ local function newServer(run) res.code = 500 res.headers = setmetatable({}, headerMeta) res.body = err - print(err) + print(string.format("An error occurred when handling %s %s: %s", req.method, req.path, err)) end local out = {