You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In an audit of our code base, we found that there were many calls that looked like: return Request.CreateResponse(HttpStatusCode.NotFound);
that, due to a refactor, were actually resolving to this: HttpResponseMessage CreateResponse<T>(this HttpRequestMessage request, T value)
This would make the service return a 200 with a body that says "NotFound". This is clearly not the intent of the programmer.
Possible solutions would be:
Add a more specific extension that specifically targets HttpStatusCode (e.g.System.Net.Http.Formatting has one)