Quantcast
Channel: ASPNETWebStack Issue Tracker Rss Feed
Viewing all articles
Browse latest Browse all 7215

Edited Issue: HttpError.ExceptionType is null [1248]

$
0
0
Having the following code:

return Request.CreateErrorResponse(
HttpStatusCode.BadRequest,
new ArgumentNullException("searchCriteria"));

I expect to be able to read ExceptionType back:

SearchCriteria searchCriteria = null;
HttpResponseMessage message = controller.Do(searchCriteria);

ObjectContent<HttpError> content = message.Content as ObjectContent<HttpError>;
HttpError error = (HttpError)content.Value;
string exceptionType = error.ExceptionType;

but the last line gives always `null`? Why is that?

Viewing all articles
Browse latest Browse all 7215

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>