Skip to content

Commit

Permalink
重试前打印导致重试的错误信息
Browse files Browse the repository at this point in the history
  • Loading branch information
Yun-Shan committed Sep 16, 2024
1 parent c7702d3 commit ac89bde
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/request/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -127,6 +127,9 @@ async function request<T = string>(url: string | URL, _options: CommonRequestOpt
} catch (e) {
if (counter > maxRetry) {
throw e;
} else {
console.log(`网络请求失败,进行第${counter}次重试,错误信息:`);
console.error(e);
}
}
}
Expand Down

0 comments on commit ac89bde

Please # to comment.