Skip to content

MAINT: raise more errors earlier #3284

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

Merged
merged 3 commits into from
Apr 8, 2025

Conversation

bsipocz
Copy link
Member

@bsipocz bsipocz commented Apr 7, 2025

So we don't end with red herring errors like when we try to parse an error response into a votable. E.g. I got a KeyError: 'RA(h)' while working on a fix for #3282 all the while the actual problem was a super clear 404

HTTPError: 404 Client Error: Not Found for url: https://ssp.imcce.fr/webservices/skybot/skybotconesearch_query.php?-ra=0.0&-dec=0.0&-rd=0.3&-ep=2458291.893831018&-loc=G37&-filter=0.1&-objFilter=111&-refsys=EQJ2000&-output=all&-mime=text

@bsipocz bsipocz added the query astroquery internals label Apr 7, 2025
@bsipocz bsipocz added this to the v0.4.11 milestone Apr 7, 2025
@bsipocz bsipocz requested a review from keflavich April 7, 2025 23:58
Copy link
Contributor

@keflavich keflavich left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Strong approve. I try to do this every time I use requests, but I guess we just missed this case.

@bsipocz
Copy link
Member Author

bsipocz commented Apr 8, 2025

Apparently I need to do some fixup here, it's great when something feels so simple that I don't even bother with running the tests locally and then have a big faceplant 😂

Copy link

codecov bot commented Apr 8, 2025

Codecov Report

Attention: Patch coverage is 66.66667% with 1 line in your changes missing coverage. Please review.

Project coverage is 69.37%. Comparing base (f021816) to head (f8d5bfc).
Report is 169 commits behind head on main.

Files with missing lines Patch % Lines
astroquery/utils/process_asyncs.py 66.66% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #3284      +/-   ##
==========================================
- Coverage   69.38%   69.37%   -0.01%     
==========================================
  Files         232      232              
  Lines       19682    19689       +7     
==========================================
+ Hits        13656    13659       +3     
- Misses       6026     6030       +4     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@bsipocz bsipocz merged commit 310967b into astropy:main Apr 8, 2025
11 of 12 checks passed
@bsipocz bsipocz deleted the MAINT_raise_for_status branch April 8, 2025 16:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
query astroquery internals
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants