diff --git a/app/decorators.py b/app/decorators.py index 08aea4f736..d8816d6180 100644 --- a/app/decorators.py +++ b/app/decorators.py @@ -186,7 +186,10 @@ def scodoc7func(func): arg_names = argspec.args for arg_name in arg_names: # pour chaque arg de la fonction vue # peut produire une KeyError s'il manque un argument attendu: - v = req_args[arg_name] + try: + v = req_args[arg_name] + except KeyError as exc: + raise ScoValueError(f"argument {arg_name} manquant") from exc # try to convert all arguments to INTEGERS # necessary for db ids and boolean values try: diff --git a/app/templates/sco_value_error.j2 b/app/templates/sco_value_error.j2 index 94b6031019..e9dbd86f90 100644 --- a/app/templates/sco_value_error.j2 +++ b/app/templates/sco_value_error.j2 @@ -15,4 +15,11 @@ {% endif %}

+

+Si le problème persiste, merci de contacter le support ScoDoc via + +{{scu.SCO_DISCORD_ASSISTANCE}} + +

+ {% endblock %} \ No newline at end of file