From 977d28bdc9a93e9be8ebf29583a03e3dedcd3044 Mon Sep 17 00:00:00 2001 From: Fredrik Tolf Date: Fri, 21 Jul 2023 02:36:01 +0200 Subject: [PATCH] Fix error reporting in new formparams code. --- wrw/util.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/wrw/util.py b/wrw/util.py index b4e5b28..dcf745a 100644 --- a/wrw/util.py +++ b/wrw/util.py @@ -26,7 +26,7 @@ def formparams(callable): args[par.name] = data[par.name] for par in sig.parameters.values(): if par.default is inspect.Parameter.empty and par.name not in args: - raise resp.httperror(400, "Missing parameter", ("The query parameter `", resp.h.code(spec.args[i]), "' is required but not supplied.")) + raise resp.httperror(400, "Missing parameter", ("The query parameter `", resp.h.code(par.name), "' is required but not supplied.")) return callable(**args) wrapper.__wrapped__ = callable return wrapper -- 2.11.0