connectrpc / connect-es

The TypeScript implementation of Connect: Protobuf RPC that works.

Home Page:https://connectrpc.com/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

getting cancelled instead of deadline_exceeded if both abort signal and timeout are provided

akosyakov opened this issue · comments

Describe the bug

As clearly as you can, please tell us what the bug is.

It have a case when we have both abort signal to indicated cancellation of server side stream, and timeout to reconnect it gracefully periodically. But they are both reported as Cancelled, I think the root cause is the linked abort signal controller.

To Reproduce

If you encountered an error message, please copy and paste it verbatim.
If the bug is specific to an RPC or payload, please provide a reduced
example.

Environment (please complete the following information):

  • @connectrpc/connect-web version: (for example, 0.1.0)
  • @connectrpc/connect-node version: (for example, 0.1.0)
  • Frontend framework and version: (for example, react@18.2.0)
  • Node.js version: (for example, 18.0.0)
  • Browser and version: (for example, Google Chrome 103.0.5060.134)

If your problem is specific to bundling, please also provide the following information:

  • Bundler and version: (for example, webpack@5.74.0)
  • Bundler plugins and version: (for example compression-webpack-plugin@10.0.0)
  • Bundler configuration file:

Additional context
Add any other context about the problem here.

Hey! Assuming you are taking about the client side, we do have a test to check for the deadline_exceeded, I added an abort signal to the same test and it still passes with deadline_exceeded. If the signal gets aborted before timeout it will return the cancelled code.

I see that there is some form of error translation in the linked PR, could it be related to that?

Assuming this is resolved, so closing. Please reopen if needed, thanks!