Use codes.Code.String() rather than logging integers

This produces better human-readable error messages.
This commit is contained in:
Tamir Duberstein
2016-12-19 15:48:27 -05:00
parent 34384f34de
commit 9871e09f09
3 changed files with 3 additions and 3 deletions

View File

@ -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.