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

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

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) —

推荐阅读:
数学题:有一个礼品盒,用彩绳扎成如右图的形状  数学题:客车从甲地到乙地要6小时;货车从乙地到甲地要8小时  数学题:一件商品按成本提高30%,换季又打八折  数学题:前三轮的平均的平均分是94  数学题:财务室会计结账时,发现账面上少了890.1元钱  数学题:一个玻璃瓶内原有盐是水的1/11  数学题:把圆柱平均分成若干份后拼成一个长方体  奥数题:甲乙两地中间有一座山岭  奥数题:一份工作按计划的时间算  简便计算题:1997÷(1997+1997/1998)+(1/1999) 
评论列表
添加评论