You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The way the execute is used in the hsd and hsw client (super().execute) throw this bad exception right as a client response, when passing an empty method to the rpc command:
This could be both a problem of bcurl, that doesn't throw an RPCError exception, or of the hs-client, that should catch the raw assertion and throw the error.
Knowing nothing, I tend to think that bcurl developers thought the execute method as private.
Intially I thought that a way to fix this could be to call the super().execute() inside a try\catch, and raise an RPCError.. but the RPCError is not exported by the client module, so I went into a loop and back to think as a bcurl "issue" (at least the dependency should be changed to export the class).
What do you think?
The text was updated successfully, but these errors were encountered:
The bcurl API raises an assertion error when an empty method is passed to the RPC
execute
method (https://github.com/bcoin-org/bcurl/blob/master/lib/client.js#L310).The way the execute is used in the hsd and hsw client (super().execute) throw this bad exception right as a client response, when passing an empty method to the
rpc
command:This could be both a problem of bcurl, that doesn't throw an RPCError exception, or of the hs-client, that should catch the raw assertion and throw the error.
Knowing nothing, I tend to think that bcurl developers thought the
execute
method as private.Intially I thought that a way to fix this could be to call the
super().execute()
inside a try\catch, and raise anRPCError
.. but theRPCError
is not exported by the client module, so I went into a loop and back to think as a bcurl "issue" (at least the dependency should be changed to export the class).What do you think?
The text was updated successfully, but these errors were encountered: