You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Ensure that errors in client calls are always provided to the user.
The expected behavior is now for the client call's completion handler to be called when the whole call is completed. You can check that completion handler's `statusCode` for the call's result. The intermediate send/receive call completion handlers will also get called with an error, but that error's status code is most likely to be `.unknown` (because send/receive calls don't receive the final status from the server).
In addition, `CallResult` now also includes the operation group's success flag, but that flag is much less important now.
This includes:
- Make most completion handlers non-throwing (their errors were for the most part discarded, anyway)
- Extract Receive-Streaming into a common protocol
- Changing many completion handler interfaces to be called with a `CallResult` instead of `Data?` and `ResultOrRPCError<ReceivedType?>` instead of `(ReceivedType, Error)`
- Not throwing on end of stream, but passing `nil` to the completion handler instead
- Making `ServerSessionUnary` always return an error when one of its calls fail
- Adding test to ensure the proper error behavior.
0 commit comments