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

BUG: SIA should raise exception for non-existing collection #3213

Open
bsipocz opened this issue Feb 18, 2025 · 0 comments
Open

BUG: SIA should raise exception for non-existing collection #3213

bsipocz opened this issue Feb 18, 2025 · 0 comments

Comments

@bsipocz
Copy link
Member

bsipocz commented Feb 18, 2025

Currently it's possible to query a collection that doesn't exist on the server and receive an empty result table. I would think a better UX would be to receive an exception in these cases.

E.g. currently this is what I get:

In [49]: Irsa.query_sia(pos=(coord, 10), collection='foobar')
Out[49]: 
<DALResultsTable length=0>
  s_ra   s_dec  facility_name instrument_name dataproduct_subtype ... pol_xel cloud_access o_ucd  upload_row_id
  deg     deg                                                     ...                                          
float64 float64     object         object            object       ...  int64     object    object     int64    
------- ------- ------------- --------------- ------------------- ... ------- ------------ ------ -------------


Note that we have looked into addressing this upstream in pyvo, but unfortunately there is no good solutions for this.
So this issue is for specifically for IRSA where we have the possible collection values, thus we cache it for the instance.

x-ref: astropy/pyvo#651

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

No branches or pull requests

1 participant