add 'template' services
This commit is contained in:
@ -60,7 +60,7 @@ class CallDispatcher:
|
||||
mandatories = list(config.value.mandatory())
|
||||
if mandatories:
|
||||
mand = [mand.split('.')[-1] for mand in mandatories]
|
||||
raise ValueError(_(f'missing parameters in response: {mand}'))
|
||||
raise ValueError(_(f'missing parameters in response: {mand} in message "{risotto_context.message}"'))
|
||||
try:
|
||||
config.value.dict()
|
||||
except Exception as err:
|
||||
@ -238,6 +238,10 @@ class Dispatcher(register.RegisterDispatcher, CallDispatcher, PublishDispatcher)
|
||||
# return the config
|
||||
return config
|
||||
|
||||
def get_service(self,
|
||||
name: str):
|
||||
return self.injected_self[name]
|
||||
|
||||
|
||||
dispatcher = Dispatcher()
|
||||
register.dispatcher = dispatcher
|
||||
|
Reference in New Issue
Block a user