-
Notifications
You must be signed in to change notification settings - Fork 448
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
Ability to run some user code whenever a binding throws an exception #5006
Comments
@jeffhollan wound I beable to modify the http response in this Exception Trigger? |
Good question. My expectation would almost be the trigger would execute async to the function that hit the exception - meaning that the HTTP response for an HTTP trigger would likely not be able to be changed - but I don't know what's possible. I suspect not - at least with my current thinking of how this would - and best bet for what you are looking for would be using richer bindings (currently only possible in .NET) where you can catch in code, or using SDK directly and not using output bindings |
Love the idea! |
This issue is a duplicate of several other issues we're already tracking:
In particular, the Invocation Filters feature allows for method/class level error handlers to be specified. That's already there for .NET languages - the work item above is about enabling it for other languages. Also related - we have an ErrorTrigger in the Extensions SDK that wasn't migrated forward to Functions v2. |
@mathewc Any updates on this one? Got a custom binding used in combination with a HttpTrigger.. but no proper way to handle exceptions and thus the eventual response. |
Realize we may do much more than what's scoped in title (trigger for any unhandled exception) but the scenario we have committed to resolve by end of this calendar year is:
We know richer bindings could allow something like
FlushAsync
for non-.NET languages (and for mitigation for now .NET users can use anICollectorAsync
withFlushAsync
to catch exceptions there), but need something shorter term.Have vetted with a few customers and the idea of having an "Exception trigger" for an "Exception function" works fine. As long as the trigger has the right context of the execution that hit an exception, and exception details, so it can be handled correctly.
The text was updated successfully, but these errors were encountered: