Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Robust error handling #10

Closed
timburks opened this issue Jan 7, 2017 · 3 comments
Closed

Robust error handling #10

timburks opened this issue Jan 7, 2017 · 3 comments
Labels
cgrpc Relates to the CgRPC based version of gRPC Swift

Comments

@timburks
Copy link
Member

timburks commented Jan 7, 2017

These error situations that aren't handled well.

  • Server methods receiving invalid message protocol buffers from clients.
  • Clients receiving invalid protocol buffers from servers.
  • Authentication failures from servers.
  • Server handler (aka "provider") failures inside dispatched threads.
@MrMage MrMage mentioned this issue Mar 22, 2018
36 tasks
MrMage added a commit to Timing-GmbH/grpc-swift that referenced this issue Oct 16, 2018
Contains the following commits:
- Refactor gRPC decoding into dedicated codec classes.
- Start work on GRPCServerHandler.
- Add a "unary call handler" and use that for the tests.
- Refactoring starting a GRPC server into a dedicated class.
- Fix sending unary responses.
- Add a handler for client-streaming calls.
- Also implement bidirectional-streaming calls.
- Make sure to flush in server-streaming calls after each sent message.
- Add the missing test cases to `allTests`.
- Refactor `StatusSendingHandler` into its own class.
- Rename `GRPCServerHandler` to `GRPCChannelHandler`.
- Remove a FIXME.
- Add a few more comments.
- Attach the actual call handlers as channel handlers instead of manually forwarding messages to them.

# This is the commit message grpc#2:

Remove SwiftGRPCNIO's dependency on SwiftGRPC and move the responsibility for encoding GRPC statuses to HTTP1ToRawGRPCServerCoded.

# This is the commit message grpc#3:

Temporarily disable two test cases that are failing at the moment.

# This is the commit message grpc#4:

Add SwiftGRPCNIO as an exposed library.

# This is the commit message grpc#5:

Another try at getting CI to work with SwiftGRPCNIO.

# This is the commit message grpc#6:

More dependency fixes.

# This is the commit message grpc#7:

Add `SwiftGRPCNIO.EchoServerTests` to LinuxMain.swift.

# This is the commit message grpc#8:

Fix a string comparison in `.travis-install.sh`.

# This is the commit message grpc#9:

Add nghttp2 to the list of CI dependencies.

# This is the commit message grpc#10:

Another try with installing nghttp2 via brew.

# This is the commit message grpc#11:

Another try at using libnghttp2-dev under Ubuntu 14.04.

# This is the commit message grpc#12:

More Travis fixes.

# This is the commit message grpc#13:

One last try.

# This is the commit message grpc#2:

Disable two more tests for now, as they sometimes fail on CI.

# This is the commit message grpc#3:

Make Carthage debug builds verbose.

# This is the commit message grpc#4:

Only use SwiftGRPC-Carthage.xcodeproj for Carthage builds.
@dvaldivia
Copy link

Indeed, right now the handling of errors while doing of streams make it really complicated to cancel a stream

@glbrntt glbrntt added the cgrpc Relates to the CgRPC based version of gRPC Swift label Feb 7, 2020
@MrMage
Copy link
Collaborator

MrMage commented Mar 19, 2020

The CgRPC implementation is now officially deprecated; closing this for now.

@MrMage MrMage closed this as completed Mar 19, 2020
@talksik
Copy link

talksik commented Dec 10, 2023

Following up on one of the scenarios, what would be a robust solution to notify a swiftUI model of a session expiry. Currently, I can only think of initializing interceptors with callbacks for onUnauthenticated errors that the interceptor receive method catches.

Is there any way of doing this to propagate or send events to the UI layer globally when there is an auth issue?

Thank you so much!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
cgrpc Relates to the CgRPC based version of gRPC Swift
Projects
None yet
Development

No branches or pull requests

5 participants