Skip to content

Propagate *http.Response when encountering a *url.Error? #3362

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

Closed
akshayravikumar opened this issue Nov 28, 2024 · 3 comments · Fixed by #3369
Closed

Propagate *http.Response when encountering a *url.Error? #3362

akshayravikumar opened this issue Nov 28, 2024 · 3 comments · Fixed by #3369

Comments

@akshayravikumar
Copy link

Why does this code return nil for the response? I'm getting 404 errors (which can be permissions errors) but I'm not finding a good way to programmatically get the status code directly from the error object.

@gmlewis gmlewis added the bug label Nov 28, 2024
@gmlewis
Copy link
Collaborator

gmlewis commented Nov 28, 2024

That's a good point. I don't see why we couldn't modify this endpoint to return the response so that the status code can be checked.

@akshayravikumar - do you want to write a PR to fix this, or shall I open this issue up to other contributors?

@gmlewis
Copy link
Collaborator

gmlewis commented Dec 4, 2024

This would be a great PR for any new contributor to this repo or a new Go developer.
All contributions are greatly appreciated!

Feel free to volunteer for any issue and the issue can be assigned to you so that others don't attempt to duplicate the work.
Also feel free to perform a code review on any PR that has the label "NeedsReview" - we appreciate those contributions too!

Please check out our CONTRIBUTING.md guide to get started. (In particular, please remember to go generate ./... and don't use force-push to your PRs.)

Thank you!

@silasalberti
Copy link
Contributor

Hey I'm a new contributor and thought this issue looked like a good start. Just submitted this: #3369

gmlewis pushed a commit that referenced this issue Dec 8, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants