Error handling for DelegatingHandlers

Topics: Web Api
Sep 22, 2011 at 3:20 PM

I've discovered that the web.config setting "includeExceptionDetailInFaults" or the code-based setting "IncludeExceptionDetail" in the WebApiConfiguration passed to MapServiceRoute() doesn't seem to work if there is an error in a DelegatingHandler.

How do I handle exceptions thrown from within a DelegatingHandler?

Sep 22, 2011 at 4:11 PM

We do look for IncludeExceptionDetail in delegating handlers when generating a response as a result of an exception. Somehow WebApiConfiguration/MapServiceRoute may not set it. We’ll have a look.

Henrik

From: shayneva [email removed]
Sent: Thursday, September 22, 2011 8:20 AM
To: Henrik Frystyk Nielsen
Subject: Error handling for DelegatingHandlers [wcf:273488]

From: shayneva

I've discovered that the web.config setting "includeExceptionDetailInFaults" or the code-based setting "IncludeExceptionDetail" in the WebApiConfiguration passed to MapServiceRoute() doesn't seem to work if there is an error in a DelegatingHandler.

How do I handle exceptions thrown from within a DelegatingHandler?