Feb 11, 2014 05:38 PM|Kiran Challa|LINK
I would like to send back a custom error. How can I do this?
You could instaed throw an HttpResponseException having the custom error message.
I tried experimenting with an ExceptionFilter on the HttpConfiguration object in my start up class, but, this does not seem to catch the exception.
This would depend on where you are trying to read the request stream. For example, if you are reading the request stream inside an action or action filter, then I would expect the exception filter to have been invoked...but if you are reading at
a message handler, then exception filters do not come into picture as they sit in higher layers of the stack...