The ConnectError object has a Details field that allows us to add our API error type next to the GRPC error (see doc).
In Go, before returning an API's type error, we have to encapsulate it in the ConnectError object, with the .grpc() method.
To handle the error correctly in React-Native, I added a GRPCError class. We can get the API's error code with the .errCode() method.
The ConnectError object has a Details field that allows us to add our API error type next to the GRPC error (see doc).
In Go, before returning an API's type error, we have to encapsulate it in the ConnectError object, with the
.grpc()
method. To handle the error correctly in React-Native, I added a GRPCError class. We can get the API's error code with the.errCode()
method.