Skip to content
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

Open
lavoiesl opened this issue Mar 25, 2019 · 1 comment
Open

ConnectTimeoutError should satisfy net.Error #95

lavoiesl opened this issue Mar 25, 2019 · 1 comment

Comments

@lavoiesl
Copy link

I’m not quite sure why it was done this way, but gomemcache creates a ConnectTimeoutError instead of the standard i/o timeout or net.OpError.

This, in turn, does not have the Timeout() and Temporary() methods to satisfy the net.Error interface, obfuscating the error handling for clients.

In our library, we ended up recreating a net.OpError: Shopify/goose#35

Could you clarify why it was done way?

I would suggest getting rid of ConnectTimeoutError and instead wrapping the poll.TimeoutError in a net.OpError to satisfy the interface and retain proper messaging.

@lavoiesl lavoiesl changed the title ConnectTimeoutError should be net.Error ConnectTimeoutError should satisfy net.Error Mar 25, 2019
@itsCodyBo
Copy link

@lavoiesl could this be related to the issue that I just posted here regarding lack of debugging information to go on?

#99

I'm really at a loss on how to process because it only says "connection timeout' and the docs say 'we shouldn't worry about this level of detail'. Not much help tbh.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants