Open aik-jahoda opened 4 years ago
we don't handle ... premature stream close correctly. Instead, we have not a clear exception
The exception is highlighting that it tried to read the next frame header but couldn't because the stream closed unexpectedly. We could improve the error message, of course, but isn't this handling it correctly?
GOAWAY
You see the same exception when the server sends GOAWAY?
When there is a protocol error
@aik-jahoda Are you saying that when we abort the connection due to a protocol error in request A, we aren't shutting down all the various tasks and so request B gets a "response ended prematurely" error rather than the same protocol error?
A repro would be helpful here.
@aik-jahoda can you post the repro here?
@aik-jahoda ping?
The error message is confusing as we receive GOAWAY and we precisely know the stream was closed. The message looks like we are still expecting bytes.
Proposed message: "The response ended prematurely, GOAWAY received"
I see, you are proposing a message change. In that case, I recommend to mention 'server' -- e.g. "Server ended the response prematurely". We do not expect API users to be familiar with details of the HTTP/2 protocol IMO.
When there is a protocol error on client-side we don't handle server GOAWAY or premature stream close correctly. Instead, we have not a clear exception: