MessageDetail value is send with response despite IncludeErrorDetailPolicy value set to Never
Repro steps:
1. In OWIN Startup set
config.IncludeErrorDetailPolicy = IncludeErrorDetailPolicy.Never;
2. create webapi method with the following code
HttpError httpError = new HttpError{Message = "error message", MessageDetail = "error details"}; var errorResponse = Request.CreateErrorResponse(HttpStatusCode.BadRequest, httpError); throw new HttpResponseException(errorResponse);
Actual result contains both Message and MessageDetail, expected should contain only Message as described here
https://msdn.microsoft.com/en-us/library/system.web.http.httperror.messagedetail%28v=vs.118%29.aspx
Isn't it wrong?