Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8629805
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 12, 20262026-06-12T08:53:57+00:00 2026-06-12T08:53:57+00:00

What are your guys thoughts on globally handling AJAX errors, displaying any/all info in

  • 0

What are your guys thoughts on globally handling AJAX errors, displaying any/all info in the console?

As of right now I do something like this:

jSpace._displayAjaxErrors = function (xhrResponseText) {

    var errObj = $.parseJSON(xhrResponseText);

    // _log is an internal console log that won't break in IE (aka does nothing)
    _self._log('\n -- AJAX ERROR @ ' + _self._getTimeStamp() + ' --');

    _self._log('ExceptionType : '   + errObj.ExceptionType);
    _self._log('Error Message : '   + errObj.Message);
    _self._log('StackTrace    : \n' + errObj.StackTrace);​

    // then a dialogBox here
};

And each .ajax() has this included at the moment:

error: function (xhr, status, error) {
    jSpace._displayAjaxErrors(xhr.responseText);
}

I’m not familiar with .ajaxError(), but wondering if there is a better way of doing all of this!

What do you do to easily see what/where the errors are?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-12T08:53:58+00:00Added an answer on June 12, 2026 at 8:53 am

    jQuery already provide ajaxError function to catch all ajax error globally, you just need to use that

    $( "div.log" ).ajaxError(function(e, jqxhr, settings, exception) {
      //e for event 
      //jqxhr for xhrResponse
    });
    

    http://api.jquery.com/category/ajax/global-ajax-event-handlers/

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Heythere. I need your guys help with file renaming using a .bat file. I
This is my first step to programming.guys your help hands required.I watched youtube video
How do you guys handle translation/internationalization of your ASP.NET applications? How do you work
I would like to know what guys are using to make diagram of your
Right guys, here's a bit of a discussion -- I'm creating a website with
I'd like to know your thoughts about HTML code generation in my JS code.
Many standard modules are all using straight up perl -- problem is these guys
Hey Guys im thinking about something what i can do to improve the current
Ok guys, three questions here. They are all pretty noobish, but I just want
My server guys disabled all socket functions and after requesting them they enabled CURL

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.