grpc client error fix (#1351)

Co-authored-by: Ben Toogood <ben@micro.mu>
This commit is contained in:
ben-toogood 2020-03-16 09:53:15 +00:00 committed by GitHub
parent ca8684a886
commit d91c14eb30
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -445,6 +445,10 @@ func (g *grpcClient) Call(ctx context.Context, req client.Request, rsp interface
// call backoff first. Someone may want an initial start delay
t, err := callOpts.Backoff(ctx, req, i)
if err != nil {
if verr, ok := err.(*errors.Error); ok {
return verr
}
return errors.InternalServerError("go.micro.client", err.Error())
}