util.error: Use is_error() instead of is_err() everywhere

Continuation of 4b39691a274e
This commit is contained in:
Kim Alvefur 2024-10-29 14:10:02 +01:00
parent ff05b0773d
commit 73b512d3a6
3 changed files with 9 additions and 9 deletions

View file

@ -206,7 +206,7 @@ local function handle_result(request, response, result)
end
elseif result_type == "string" then
body = result;
elseif errors.is_err(result) then
elseif errors.is_error(result) then
response.status_code = result.code or 500;
body = events.fire_event("http-error", { request = request, response = response, code = result.code or 500, error = result });
elseif promise.is_promise(result) then