Skip to content

Conversation

murgatroid99
Copy link
Member

This makes a couple of changes to HTTP status code handling:

  1. When surfacing a gRPC error synthesized from an HTTP status code, the details string now contains the actual status code number.
  2. When a call ends with no trailers received and there was a non-OK HTTP status code, surface that error instead of a more generic error about not receiving trailers. This fixes grpc-js doesn't handle HTTP/2 error responses with headers and a body and no trailers #2722.

I also added some information to the "RST_STREAM with code 0" error to explain what it means semantically, and I had to refactor handleTrailers. That refactor does change the behavior slightly, mainly to prioritize the gRPC status over the HTTP status when provided, which I think is more correct behavior.

@murgatroid99 murgatroid99 merged commit 0bbfb92 into grpc:@grpc/[email protected] May 1, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants