Jump to content

ajax error callback....


Recommended Posts

now...when error callback of ajax request fires I just display a message to the user....but how am I going to be notified for the reason the request failed...I mean me the dev.

Of course I have not intention showing technial details to the end user..the aim is that such info(must somehow reach me)..any suggestions?

Link to post
Share on other sites

The HTTP status (requestObject.status) will usually provide some useful information. It will provide a number returning one of the codes listed on this page:

https://www.w3schools.com/tags/ref_httpmessages.asp

If the user's internet was offline at the time, the status code would be zero.

Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
×
×
  • Create New...