Handle 500 errors in JSON (jQuery)

前端 未结 5 1334
孤城傲影
孤城傲影 2020-12-28 14:35

This JSON request:

$.ajax({
    url:jSONurl+\'?orderID=\'+thisOrderID+\'&variationID=\'+thisVariationID+\'&quantity=\'+thisQuantity+\'&callback=?         


        
5条回答
  •  甜味超标
    2020-12-28 15:16

    Did you try statuscode callback like

     $.ajax({
        statusCode: {
            500: function() {
              alert("Script exhausted");
            }
          }
       });
    

提交回复
热议问题