We have a web API in which there is an action that returns BadRequest (), which is 400.
The API call is as follows:
$.post("/api/controller/action", {test:"Bad data"}).success(function(data){
console.log(data)
});
The Action Controller API method returns IHTTPActionResult of BadRequest ("Bad data received"); The Chrome inspector checks that the return was 400, Fiddler verifys 400, but jQuery runs its success method and console.log (data); shows us that data.status = 240.
I don't think it's just jQuery, because the AngularJS $ http service does the same.
source
share