How to Fix CloudFlare Error 1101 (Worker threw exception)?

  • 时间:2020-09-07 12:26:38
  • 分类:网络文摘
  • 阅读:120 次

After the update to the Load Balancer Node https://steem.justyy.workers.dev a few days ago, I started to notice the `scriptThrewException` error

scriptThrewException

Number of Errors 6
Number of Requests 6
Number of Sub Requests 42
CPU Time P50 (ms) 2.11
CPU Time P90 (ms) 3.37
CPU Time P99 (ms) 3.8
CPU Time P99.9 (ms) 3.85

After investigation, I found out it is due to Error 1101 thrown by CloudFlare Worker.

cloudflare-1101-error-worker-threw-exception How to Fix CloudFlare Error 1101 (Worker threw exception)? cloud cloud computing cloudflare javascript

This usually happens, when the script throws a Javascript exception, and can be handled by Try-Catch.

Further investigation shows that the error is caused by a rejection in a Promise, which is not handled. Thus, changing to the following (error happens when sending API to RPC node to Get the Version of the Steem Blockchain RPC Node)

1
2
3
4
5
6
  let version = "";
  try {
    version = await getVersion(server);
  } catch (e) {
    version = JSON.stringify(e);
  }
  let version = "";
  try {
    version = await getVersion(server);
  } catch (e) {
    version = JSON.stringify(e);
  }

–EOF (The Ultimate Computing & Technology Blog) —

推荐阅读:
网络安全公司实习生的经验分享  运营笔记:是时候了解蜘蛛爬取原理了!揭秘收录难题  新网站关键词怎么做优化会更好?  怎么给网站优化?切忌做标题党  运营笔记:SEO快排那些事儿!  运营笔记:你的网站为什么不收录?看看这篇文章的解读!  数学题:甲乙两人分别从AB两点出发  数学题:将10毫升酒装入一个圆锥形容器中  数学题:参加数学兴趣小组的同学中  数学题相遇时货车行了240km 
评论列表
添加评论