这个 JSON 请求:
$.ajax({
    url:jSONurl+'?orderID='+thisOrderID+'&variationID='+thisVariationID+'&quantity='+thisQuantity+'&callback=?',
    async: false,
    type: 'POST',
    dataType: 'json',
    success: function(data) {
        if (data.response == 'success'){
            //show the tick. allow the booking to go through
            $('#loadingSML'+thisVariationID).hide();
            $('#tick'+thisVariationID).show();
        }else{
            //show the cross. Do not allow the booking to be made
            $('#loadingSML'+thisVariationID).hide();
            $('#cross'+thisVariationID).hide();
            $('#unableToReserveError').slideDown();
            //disable the form
            $('#OrderForm_OrderForm input').attr('disabled','disabled');
        }
    },
    error: function(data){
        alert('error');
    }
})
在某些情况下,会以以下形式返回 500 错误:
jQuery17205593111887289146_1338951277057({"message":"Availability exhausted","status":500});
然而,这对我仍然有用,我需要能够正确处理这个问题。
但是由于某种原因,当返回这个 500 错误时,我的错误函数没有被调用,我只是在 firebug 中得到一个“NetworkError:500 Internal Server Error”错误。
我该如何处理?