HttpJson ServerSideStreaming error in EchoClient #1286
Labels
priority: p2
Moderately-important priority. Fix may not be included in next release.
type: bug
Error or flaw in code with unintended results or allowing sub-optimal usage patterns.
For Java, we have a test case that tries to mimic an exception in the middle of the stream. The full response payload should be
"The rain in Spain stays mainly on the plain!"
with each word as it's own response. TheCancelled
exception would come after theSpain
response.Error:
which seems to stem from the response coming back as:
The exception above seems to be complaining that there is a missing
,
between the payload and the error message, which I believe is caused from:EchoService impl:
gapic-showcase/server/services/echo_service.go
Line 54 in 6d0f5b7
gapic-showcase/util/genrest/resttools/server_streamer.go
Line 107 in 6d0f5b7
gapic-showcase/util/genrest/resttools/error_response.go
Line 68 in 6d0f5b7
A few questions:
Would an exception that comes back in the middle of stream come back as a json response? Or would we have an expectation that the trailer message would have an exception with Status Code 499? I see from the local debugging that the status code currently comes back as a 200 (which I believe is due to https://cs.opensource.google/go/go/+/refs/tags/go1.17.1:src/net/http/server.go;l=120-126)
What should the correct behavior be?
The text was updated successfully, but these errors were encountered: