grpc-swift
grpc-swift copied to clipboard
Where's the documentation on error handling?
What are you trying to achieve?
Presumably, grpc-swift error codes follow the regular gRPC status code conventions. I'd like to catch and respond to different types of gRPC errors. For example, retry based on the retry instructions when its UNAVAILABLE, or do a token refresh when it's UNAUTHENTICATED.
What have you tried so far?
There's no documentation on this? I found GRPCError and the makeGRPCStatus() -> GRPCStatus method but GRPCError thing isn't an Error type.
In general you should catch GRPCStatusTransformable and then use makeGRPCStatus() to give you the appropriate status code so that you make decisions about how to handle it.