Error: Request failed with status code 429

╰半夏微凉° 2023-03-13 09:23 46阅读 0赞

出现 Error: Request failed with status code 429错误的原因
请求的次数过多 导致在某个循环中运行上面的代码行,导致Axios同时触发所有请求。
解决方法通过等待响应,就像这样

  1. try {
  2. const result = await axios.post(`YOUR_URL`, { <Your JSON payload>});
  3. } catch (error) {
  4. console.error(error);
  5. }

发表评论

表情:
评论列表 (有 0 条评论,46人围观)

还没有评论,来说两句吧...

相关阅读