mirror of
https://github.com/go-micro/go-micro.git
synced 2025-04-17 11:06:19 +02:00
optimize the process of switching grpc error to micro error (#2158)
This commit is contained in:
parent
b11a2f17e9
commit
1b5d372b5b
@ -33,5 +33,10 @@ func microError(err error) error {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// fallback
|
// fallback
|
||||||
return errors.InternalServerError("go.micro.client", s.Message())
|
return &errors.Error{
|
||||||
|
Id: "go.micro.client",
|
||||||
|
Code: int32(s.Code()),
|
||||||
|
Detail: s.Message(),
|
||||||
|
Status: s.Code().String(),
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user