From: Fredrik Tolf Date: Fri, 21 Jul 2023 00:36:01 +0000 (+0200) Subject: Fix error reporting in new formparams code. X-Git-Url: http://git.dolda2000.com/gitweb/?a=commitdiff_plain;h=977d28bdc9a93e9be8ebf29583a03e3dedcd3044;p=wrw.git Fix error reporting in new formparams code. --- 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