# HG changeset patch # User Matthew Wild # Date 1759339033 -3600 # Node ID 1fc38a840baafdafc480c81dba3e30b52fe1b3c4 # Parent 6a3b38051d745cfcfe22eeb84974205130e4af74 mod_http_admin_api: Pass util.error object as response when request fails diff -r 6a3b38051d74 -r 1fc38a840baa mod_http_admin_api/mod_http_admin_api.lua --- a/mod_http_admin_api/mod_http_admin_api.lua Wed Oct 01 18:16:25 2025 +0100 +++ b/mod_http_admin_api/mod_http_admin_api.lua Wed Oct 01 18:17:13 2025 +0100 @@ -87,7 +87,8 @@ if not permit then return code; end - return errors.coerce(handler(event, ...)); + local ret, err = errors.coerce(handler(event, ...)); + return ret or err; end; end return routes;