Durable function raiseEvent
method throws if orchestration function with supplied instanceId does not exist #618
Open
Description
The documentation for Send events section in the notes states If there is no orchestration instance with the specified instance ID, the event message is discarded.
This would imply, that when non existing instanceId
is passed, that the call simply does nothing.
await client.raiseEvent( // based on docs this should just do nothing if orchestration function with ID my-nonexisting-id does not exist
"my-nonexisting-id",
"SomeEvent",
null
);
However in reality when raiseEvent
method is invoked with non-existing instanceId
it throws an error:
Error: No instance with ID 'my-nonexisting-id' found.
at DurableClient.<anonymous> (C:\Users\nej\source\repos\azf-samples-ts\node_modules\durable-functions\lib\src\durableClient\DurableClient.js:240:43)
at Generator.next (<anonymous>)
at fulfilled (C:\Users\nej\source\repos\azf-samples-ts\node_modules\durable-functions\lib\src\durableClient\DurableClient.js:5:58)
at process.processTicksAndRejections (node:internal/process/task_queues:95:5
Expected behavior
Either adjust documentation to state that raiseEvent
throws in case of non-existing instanceId
or adjust implementation to not throw in such case.
Actual behavior
If raiseEvent
method is invoked with non-existing instanceId
it throws an error.