not use internal protobuf to transfer error
Signed-off-by: Vasiliy Tolstov <v.tolstov@unistack.org>
This commit is contained in:
5
error.go
5
error.go
@@ -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 {
|
||||
|
Reference in New Issue
Block a user