Open yoursunny opened 4 years ago
Hey @koorchik can you review and merge?
After a long time without action from the repository owner, I have decided to publish my patches in a fork: @yoursunny/mole-rpc. If anyone else is affected from this bug, you can try my fork.
This issue will affect our ability to use as well. I've just been reviewing the code for our use and there are several 'robustness' issues that stick out, this being one of them....
The code has a bug: if the server sends an error code other than
-32601
and-32002
, the client shows an unfriendly error: errorBuilder is not a function.This patch fixes the bug by constructing a generic
Error
object witherrorData.code
anderrorData.message
.To reproduce the bug:
client.js
server.go
Response sent by server: