net/http: TimeoutHandler should distinguish between timeout and requests closed by clients. #48948
Labels
FrozenDueToAge
NeedsInvestigation
Someone must examine and confirm this is a valid issue and not a duplicate of an existing one.
Milestone
If a call runs for less than its time limit, but the client cancels the request, TimeoutHandler will respond the same way -- with an ErrHandlerTimeout.
This makes it hard to tell if the code is performing poorly and hitting a timeout, or if the clients are ending requests.
I propose a conditional is added here, to check if the context's error is a context.DeadlineExceeded or context.Canceled, and return different errors.
The text was updated successfully, but these errors were encountered: