client/grpc: fix error panic (#1860)

This commit is contained in:
ben-toogood 2020-07-20 10:04:51 +01:00 committed by Vasiliy Tolstov
parent 26e3c83c2d
commit a384632c93

View File

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