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

Prevent Panic'ing on Timeout #6

Open
miguelbernadi opened this issue Mar 20, 2019 · 1 comment
Open

Prevent Panic'ing on Timeout #6

miguelbernadi opened this issue Mar 20, 2019 · 1 comment

Comments

@miguelbernadi
Copy link
Owner

The Process function panics when the Do method returns a non-nil error. Some errors may be worth Panic'ing at that point, but others are not.

if err != nil { log.Panic(err) }

Identify the sources of error in that case and explicitly handle sanely those situations that can be handled. Also document the tradeoffs clearly in the project documentation.

@miguelbernadi
Copy link
Owner Author

The returned error is supposed to be of type url.Error https://godoc.org/net/url#Error which includes methods to verify if it's a temporary error or a timeout. Let's decide what we should in each case.

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

1 participant