-
-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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
[Question] Best practices for handling events and error reporting in ASP.NET Core Web API #1275
Comments
santhanuv
changed the title
Best practices for handling events and error reporting in ASP.NET Core Web API
[Question] Best practices for handling events and error reporting in ASP.NET Core Web API
Jun 24, 2024
I'd definitely return a 200 from that controller if the event published successfully. For dealing with step errors you can either query the status using the DbContext or use WFC's lifecycle events to handle errors more reactively. |
Thank you for your response, and I apologize for the long delay in getting back to you. Just to update you, we're currently sending a 200 OK status from the controller. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Hi,
I'm using WorkflowCore in an ASP.NET Core Web API backend and calling publishEvent from a controller. Since the event is processed by the workflow as a background task, I'm unsure what response to return from the controller.
All our steps are short and should finish quickly, so I'm considering whether solutions like polling, long polling, or WebSockets are necessary.
If I send a generic 200 OK response after publishing the event and an error occurs during the execution of a step, how can I inform the front end about this issue? I'm using Angular on the front end and would like to handle this scenario effectively.
Thanks!
The text was updated successfully, but these errors were encountered: