diff --git a/src/risotto/dispatcher.py b/src/risotto/dispatcher.py index 301d4ea..3928ef0 100644 --- a/src/risotto/dispatcher.py +++ b/src/risotto/dispatcher.py @@ -320,33 +320,19 @@ class Dispatcher(register.RegisterDispatcher, module_name = function.__module__.split('.')[-2] function_name = function.__name__ info_msg = _(f'in module {module_name}.{function_name}') - try: - # build argument for this function - if risotto_context.type == 'rpc': - kw = config_arguments - else: - kw = {} - for key, value in config_arguments.items(): - if key in function_obj['arguments']: - kw[key] = value + # build argument for this function + if risotto_context.type == 'rpc': + kw = config_arguments + else: + kw = {} + for key, value in config_arguments.items(): + if key in function_obj['arguments']: + kw[key] = value - kw['risotto_context'] = risotto_context - returns = await function(self.injected_self[function_obj['module']], **kw) - except CallError as err: - if risotto_context.type == 'rpc': - raise err - continue - except Exception as err: - if risotto_context.type == 'rpc': - raise err - if get_config().get('global').get('debug'): - print_exc() - await log.error_msg(risotto_context, - kwargs, - err) - continue + kw['risotto_context'] = risotto_context + returns = await function(self.injected_self[function_obj['module']], **kw) else: if risotto_context.type == 'rpc': # valid returns