consistent var name

This commit is contained in:
Mikhail Katychev 2020-09-29 18:57:21 -05:00
parent 714f77ecb9
commit 2500a485f3
No known key found for this signature in database
GPG Key ID: 9E8549CD2CEB5E59
1 changed files with 2 additions and 2 deletions

View File

@ -100,8 +100,8 @@ func InvokeRPC(ctx context.Context, source DescriptorSource, ch grpcdynamic.Chan
return fmt.Errorf("target server does not expose service %q", svc)
}
// return the error unstringified if it is a gRPC status error
if statusErr, ok := status.FromError(err); ok {
return status.Errorf(statusErr.Code(), "failed to query for service descriptor %q: %s", svc, statusErr.Message())
if errStatus, ok := status.FromError(err); ok {
return status.Errorf(errStatus.Code(), "failed to query for service descriptor %q: %s", svc, errStatus.Message())
}
return fmt.Errorf("failed to query for service descriptor %q: %v", svc, err)
}