Closed Jonathan-Rosenberg closed 3 weeks ago
@N-o-Z the opposite, we now start logging them in case of an error
@N-o-Z the opposite, we now start logging them in case of an error
I might be color blind... 😅
@arielshaqed
respReadLimit = int64(4096)
. The provided comment is actually a copy of the code that does that in the retryable client default implementation. The difference is that the retryable client doesn't return a response (as opposed to the custom error handler), but an error (check out the last section in the description after the example)This is truly a bug, but the bigger picture is that this code is redundant and adds no value.
Closes #8331
Change Description
The current custom error handler is doing redundant work that eventually causes the
read on closed response body
.Current Flow
Example for generated code from point 5:
Removing the custom error handler will not affect the current usage which will behave as we expect. This is because the behavior of the default retry client is to drain the body and return an error without the response. That way the generated code will not try to read the response, but will return an error...