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

[ENH] geo_download_links error handling #216

Open
alexhermida opened this issue Apr 23, 2024 · 1 comment
Open

[ENH] geo_download_links error handling #216

alexhermida opened this issue Apr 23, 2024 · 1 comment
Labels
enhancement New feature or request

Comments

@alexhermida
Copy link

alexhermida commented Apr 23, 2024

Is your feature request related to a problem? Please describe.

Currently the geo_download_links function is not accurate on the responses as it's raising KeyError for IDs that don't exit but also for IDs which do exist but they don't have supplementary files attached.

So this test and error raised is not accurate and could lead to a misunderstanding.

Describe the solution you'd like

I think the error should be different for IDs that doesn't exists and IDs that do exist and don't have downloadable links.

But first refactor could be just failing first checking if the response is a 404 (instead down in the code) and raising the specific error "No downloadable links available for the following GEO id" or something similar.
Next step would be to effectively check if the GEO id exists or not if that useful here.

Happy to make a contribution and open a PR if you think this is useful.

Thanks for all the work on the library.

Best.

@alexhermida alexhermida added the enhancement New feature or request label Apr 23, 2024
@saketkc
Copy link
Owner

saketkc commented Apr 24, 2024

Good point. We should handle this. PRs are always welcome!

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

No branches or pull requests

2 participants