Use codes.Code.String() rather than logging integers
This produces better human-readable error messages.
This commit is contained in:
@ -377,7 +377,7 @@ type rpcError struct {
|
||||
}
|
||||
|
||||
func (e *rpcError) Error() string {
|
||||
return fmt.Sprintf("rpc error: code = %d desc = %s", e.code, e.desc)
|
||||
return fmt.Sprintf("rpc error: code = %s desc = %s", e.code, e.desc)
|
||||
}
|
||||
|
||||
// Code returns the error code for err if it was produced by the rpc system.
|
||||
|
Reference in New Issue
Block a user