in azure/durable_functions/models/DurableOrchestrationContext.py [0:0]
def _get_function_name(self, name: FunctionBuilder,
trigger_type: Union[OrchestrationTrigger, ActivityTrigger]):
try:
if (isinstance(name._function._trigger, trigger_type)):
name = name._function._name
return name
else:
if (trigger_type == OrchestrationTrigger):
trigger_type = "OrchestrationTrigger"
else:
trigger_type = "ActivityTrigger"
error_message = "Received function with Trigger-type `"\
+ name._function._trigger.type\
+ "` but expected `" + trigger_type + "`. Ensure your "\
"function is annotated with the `" + trigger_type +\
"` decorator or directly pass in the name of the "\
"function as a string."
raise ValueError(error_message)
except AttributeError as e:
e.message = "Durable Functions SDK internal error: an "\
"expected attribute is missing from the `FunctionBuilder` "\
"object in the Python V2 programming model. Please report "\
"this bug in the Durable Functions Python SDK repo: "\
"https://github.com/Azure/azure-functions-durable-python.\n"\
"Error trace: " + e.message
raise e