grpc / grpc/grpc-java

Client does not report expected error code for 431 HTTP status

Aperta
#11,248 1 commento 0 reazioni 1 assegnatario Rivendicata da @ejona86 Vedi su GitHub
Lingua principale
Java
Stelle
12.1k
Fork
4k
Merge medio
2g 17h
PR unite (30g)
37

Descrizione

A well-formed gRPC response always has an HTTP status code of “200 OK”. The gRPC docs specify a table for mapping other HTTP status codes to gRPC error codes: https://github.com/grpc/grpc/blob/master/doc/http-grpc-status-mapping.md.

The client in this repo mostly conforms to this table. This was tested with responses that include a variety of HTTP status codes but no body (and thus no “content-type” header) and no “grpc-status” header. The status codes tested include all values in the table linked above as well as a sampling of other codes (to test the last line of the table, which states that all other HTTP status codes should map to an `unknown` error code).

The one issue uncovered was for HTTP status 431 (Request Header Fields Too Large). Per the table, this HTTP status should result in an `unknown` error code. However it instead results in an `internal` error code.

Guida per i contributori

Apri la guida per i contributori

Valutazione

Questa issue non è ancora stata valutata.

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.