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

Question: Is there a way to add some middleware to catch the ObjectDisposedException #16

Open
ConnectAutomatisering opened this issue Aug 28, 2024 · 0 comments

Comments

@ConnectAutomatisering
Copy link

Hi,

When the events are beeing handled in the blazor pages it sometimes happens that the page is closed the moment the event is being handled. This causes a ObjectDisposedException.

This is away to prevent most of the errors:
image

But of course sometimes it happens a couple of milliseconds later and it happens anyway.

Could you add a middleware so i can build a try catch around the handling of the requests?

Workarounds could also be:

  1. Building my own extension method on the courier and make a decorator.
  2. Use the Mediatr pipeline.

But it feels like the courier package is the place it should be. What do you think?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant