当邮件黑猩猩订阅函数成功时,它将返回代码200,当其失败时将返回代码400。如何重新配置JS,以便代码400在AJAX调用中触发错误函数?json_encode($data));
$responseCode = curl_getinfo($mchAPI, CURLINFO_HTTP_CODE); // This will return '200' if successful or '400
console.log(tweets); }})();Failed to load resource: the server responded with a status of 400 (Bad Request)另外,如果我直接转到那个url,我会在JSON中得到以下错误:
{"errors":[{"code