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

in #wherein6 years ago

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 Errors6
Number of Requests6
Number of Sub Requests42
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.

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)

  let version = "";
  try {
    version = await getVersion(server);
  } catch (e) {
    version = JSON.stringify(e);
  }

Reposted to Blog


Every little helps! I hope this helps!

Steem On!~

If you like my work, please consider voting for me or Buy Me a Coffee, thanks!
https://steemit.com/~witnesses type in justyy and click VOTE



Alternatively, you could proxy to me if you are too lazy to vote!

Also: you can vote me at the tool I made: https://steemyy.com/witness-voting/?witness=justyy

Sort:  

#Resteem
Great information. Keep it up.

啪啪啪 !shop

你好鸭,justyy!

@cloudblade给您叫了一份外卖!

爱心饼干

吃饱了吗?跟我猜拳吧! 石头,剪刀,布~

如果您对我的服务满意,请不要吝啬您的点赞~

Coin Marketplace

STEEM 0.04
TRX 0.32
JST 0.088
BTC 59993.95
ETH 1578.05
USDT 1.00
SBD 0.42