client/grpc: fix error panic (#1860)
This commit is contained in:
parent
26e3c83c2d
commit
a384632c93
4
error.go
4
error.go
@ -24,7 +24,9 @@ func microError(err error) error {
|
|||||||
|
|
||||||
// return first error from details
|
// return first error from details
|
||||||
if details := s.Details(); len(details) > 0 {
|
if details := s.Details(); len(details) > 0 {
|
||||||
return microError(details[0].(error))
|
if verr, ok := details[0].(error); ok {
|
||||||
|
return microError(verr)
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// try to decode micro *errors.Error
|
// try to decode micro *errors.Error
|
||||||
|
Loading…
Reference in New Issue
Block a user