explicite error when value in param is invalid

This commit is contained in:
Emmanuel Garette 2020-08-13 09:13:00 +02:00
parent d3a5c99e51
commit 10637656fa

View File

@ -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,