hyper icon indicating copy to clipboard operation
hyper copied to clipboard

Errors caused by `JoinError::Cancelled` don't return true for `Error::is_canceled`

Open hegelocampus opened this issue 3 years ago • 0 comments

Version 0.14.17

Platform N/A

Description When requests are cancelled because of a JoinError::Cancelled error, it is processed in the hyper library as a connection error because the failure is happening during dns resolution, but in this case it seems like it would be more correct for this to be saved as a cancelation, rather than a connection error.

See this debug print of the Error I'm encountering here: hyper::Error(Connect, ConnectError("dns error", Custom { kind: Interrupted, error: JoinError::Cancelled }))

It would be much more valuable if this were a CancelledError as it would give greater flexibility in distinguishing cancelled JoinHandles from actual connection errors.

hegelocampus avatar Jun 16 '22 22:06 hegelocampus