But when I run the code I see two errors on console. One is my "The ajax call...", and the other one is from the Google Chrome which is even before my error handler.
POST http://localhost:5785/Admin/ut 404 (Not Found) -- I don't want to see this one -- jquery-2.0.3.js:7845
The ajax call returned error 404: Not Found admin.js:165
Member
2 Points
5 Posts
Handling ajax call errors (404, 500, etc.)
Feb 12, 2014 11:50 PM|a ch|LINK
Hi,
I'm using $.ajax method to send some information (json) to the server. But I dont have the server function yet. So it will return 404 Not Found error.
The thing is I want to handle this 404 error myself so the browser won't raise an error for it.
My partial code is:
But when I run the code I see two errors on console. One is my "The ajax call...", and the other one is from the Google Chrome which is even before my error handler.
How can I manage that?
Participant
1390 Points
323 Posts
Re: Handling ajax call errors (404, 500, etc.)
Feb 13, 2014 07:56 AM|valuja|LINK
Hi,
As far as I know it is not possible to supress for example 404 errors from the console, see for example here http://stackoverflow.com/questions/16372271/jquery-ajax-how-to-prevent-404-errors-spam-in-chrome-devtools
/Johan