-
Notifications
You must be signed in to change notification settings - Fork 457
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
ConnectTimeoutError should satisfy net.Error #95
Comments
lavoiesl
changed the title
ConnectTimeoutError should be net.Error
ConnectTimeoutError should satisfy net.Error
Mar 25, 2019
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
I’m not quite sure why it was done this way, but gomemcache creates a
ConnectTimeoutError
instead of the standardi/o timeout
ornet.OpError
.This, in turn, does not have the
Timeout()
andTemporary()
methods to satisfy thenet.Error
interface, obfuscating the error handling for clients.In our library, we ended up recreating a
net.OpError
: Shopify/goose#35Could you clarify why it was done way?
I would suggest getting rid of
ConnectTimeoutError
and instead wrapping thepoll.TimeoutError
in anet.OpError
to satisfy the interface and retain proper messaging.The text was updated successfully, but these errors were encountered: