status: remove Error method accidentally added to *Status (#3561)
This commit is contained in:
@ -100,11 +100,6 @@ func (s *Status) Err() error {
|
|||||||
return (*Error)(s.Proto())
|
return (*Error)(s.Proto())
|
||||||
}
|
}
|
||||||
|
|
||||||
func (s *Status) Error() string {
|
|
||||||
p := s.Proto()
|
|
||||||
return fmt.Sprintf("rpc error: code = %s desc = %s", codes.Code(p.GetCode()), p.GetMessage())
|
|
||||||
}
|
|
||||||
|
|
||||||
// WithDetails returns a new status with the provided details messages appended to the status.
|
// WithDetails returns a new status with the provided details messages appended to the status.
|
||||||
// If any errors are encountered, it returns nil and the first error encountered.
|
// If any errors are encountered, it returns nil and the first error encountered.
|
||||||
func (s *Status) WithDetails(details ...proto.Message) (*Status, error) {
|
func (s *Status) WithDetails(details ...proto.Message) (*Status, error) {
|
||||||
|
Reference in New Issue
Block a user