JQuery AJAX web API call returns status 240 when API controller action returns BadRequest ()

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.

+4
source share
1

, Chrome Firefox. , Trovi, , (). , , .

, : http://www.anvisoft.com/resources/how-to-remove-trovi-com-browser-hijacker-trovi-com-removal-guide/

, , 400 Bad Request 240.

+1

All Articles