I'm working on exception-handling in my Azure webhook function.
I would like to be able to catch all exceptions in a filter and return a default response (something like req.CreateResponse(HttpStatusCode.InternalServerError);) from my webhook.
Is such a task ment for FunctionExceptionFilterAttribute, and how do i get the request/response from the context? Or is it another way to do this in a webhook azure function?
Have you tried using exception filters as discussed here?
Yes, that was what i reffered to in my initial comment. There is nothing there that makes it possible to access the request/response object :-/
@mathewc is this possible?
@mathewc is this possible?
+1 - I agree that without the ability to return a certain result object, such as BadRequestObjectResult based on the exception, the FunctionExceptionFilterAttribute isn't overly useful.
Most helpful comment
@mathewc is this possible?