mirror of
https://github.com/kaspanet/kaspad.git
synced 2025-03-30 15:08:33 +00:00
[NOD-1397] Add to rpc client ErrRPC (#934)
This commit is contained in:
parent
798abf2103
commit
34a1b30006
@ -63,8 +63,11 @@ func (c *RPCClient) route(command appmessage.MessageCommand) *routerpkg.Route {
|
||||
return c.rpcRouter.routes[command]
|
||||
}
|
||||
|
||||
// ErrRPC is an error in the RPC protocol
|
||||
var ErrRPC = errors.New("rpc error")
|
||||
|
||||
func (c *RPCClient) convertRPCError(rpcError *appmessage.RPCError) error {
|
||||
return errors.Errorf("received error response from RPC: %s", rpcError.Message)
|
||||
return errors.Wrap(ErrRPC, rpcError.Message)
|
||||
}
|
||||
|
||||
// SetLogger uses a specified Logger to output package logging info
|
||||
|
Loading…
x
Reference in New Issue
Block a user