From 10637656fadaec1a8a473a9d4f28e49dac8fd33a Mon Sep 17 00:00:00 2001 From: Emmanuel Garette Date: Thu, 13 Aug 2020 09:13:00 +0200 Subject: [PATCH] explicite error when value in param is invalid --- src/risotto/dispatcher.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/risotto/dispatcher.py b/src/risotto/dispatcher.py index 92c400b..d2f0d0d 100644 --- a/src/risotto/dispatcher.py +++ b/src/risotto/dispatcher.py @@ -239,6 +239,10 @@ class Dispatcher(register.RegisterDispatcher, if get_config()['global']['debug']: print_exc() raise ValueError(_(f'unknown parameter in "{uri}": "{key}"')) + except ValueError as err: + if get_config()['global']['debug']: + print_exc() + raise ValueError(_(f'invalid value for "{key}" in "{uri}": {err}')) # check mandatories options if check_role and get_config().get('global').get('check_role'): await self.check_role(subconfig,