Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Durable function raiseEvent method throws if orchestration function with supplied instanceId does not exist #618

Open
yohny opened this issue Oct 18, 2024 · 0 comments
Labels
documentation Requires documentation update P2 Priority 2 item

Comments

@yohny
Copy link

yohny commented Oct 18, 2024

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.
Image
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.

@AnatoliB AnatoliB added P2 Priority 2 item documentation Requires documentation update and removed Needs: Triage 🔍 labels Oct 18, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation Requires documentation update P2 Priority 2 item
Projects
None yet
Development

No branches or pull requests

2 participants