not use internal protobuf to transfer error

Signed-off-by: Vasiliy Tolstov <v.tolstov@unistack.org>
This commit is contained in:
2020-10-08 13:19:30 +03:00
parent 3aa3132caa
commit 131916baca
6 changed files with 0 additions and 374 deletions

View File

@@ -1,7 +1,6 @@
package grpc
import (
pb "github.com/unistack-org/micro-client-grpc/internal/errors"
"github.com/unistack-org/micro/v3/errors"
"google.golang.org/grpc/status"
)
@@ -17,10 +16,6 @@ func microError(err error) error {
return verr
}
if verr, ok := err.(*pb.Error); ok {
return &errors.Error{Id: verr.Id, Code: verr.Code, Detail: verr.Detail, Status: verr.Status}
}
// grpc error
s, ok := status.FromError(err)
if !ok {