I\'m making some GET requests to an App Engine app, testing in Chrome. Whilst I can see in javascript console that some calls result in a 500 server error, I can\'t seem to
I had a similar problem, I was using jquery's promise functions of .done, .fail, .always, and if I encountered a 500 internal server error then it would not fire any of the functions (done, fail, always, error). very weird.
in the end I added a timeout into the .ajax options, when it hits the timeout it throws an error and also runs the .fail method.
searchify.myAjaxSearchTerms = $.ajax({
'url': url,
type: "GET",
'dataType': 'jsonp',
'jsonp': 'json.wrf',
'jsonpCallback': searchify.cbFunc,
timeout: 4000, //needed for 500 errors - will go to fail block on timeout
beforeSend: searchify.beforeSendAutocomplete
});
searchify.myAjaxSearchTerms.fail(function(XHR, status, error){
searchify.clearForm();
searchify.renderWarningForNoQuery('Sorry. We had a problem performing that search...
Please try again
Enter a product name, catalogue number or keyword');
});