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
1 changed files with 4 additions and 0 deletions

View File

@ -239,6 +239,10 @@ class Dispatcher(register.RegisterDispatcher,
if get_config()['global']['debug']: if get_config()['global']['debug']:
print_exc() print_exc()
raise ValueError(_(f'unknown parameter in "{uri}": "{key}"')) 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 # check mandatories options
if check_role and get_config().get('global').get('check_role'): if check_role and get_config().get('global').get('check_role'):
await self.check_role(subconfig, await self.check_role(subconfig,