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

Distinguishing zero results because of no results, or because of server error #5661

Open
dstansby opened this issue Nov 1, 2021 · 40 comments
Labels
Effort Medium Requires a moderate time investment Feature Request New feature wanted! net Affects the net submodule Package Intermediate Requires some knowledge of the internal structure of SunPy Priority Medium Non-urgent action required

Comments

@dstansby
Copy link
Member

dstansby commented Nov 1, 2021

This weekend the solar orbiter archive was down, which prompted this bug report for a not very nice error being raised by sunpy-soar: https://github.com/dstansby/sunpy-soar/issues/11. I think the solution to that issue is to return zero results from the client, so other clients have a chance to return results (e.g. for a time only search). It would be helpful to have a way of informing the user of the difference between:

  • Returned zero results because the server didn't have any results
  • Returned zero results because of a server error
@Cadair
Copy link
Member

Cadair commented Nov 1, 2021

We could do better, but what some clients do is to raise warnings and then return 0 results.

@dstansby dstansby added the net Affects the net submodule label Nov 10, 2021
@dstansby
Copy link
Member Author

I am 👍 to resolving this by recommending people writing clients raise a warning if the server they are querying is down, and by putting such warnings in the sunpy core clients.

@nabobalis nabobalis added Feature Request New feature wanted! Package Novice Requires little knowledge of the internal structure of SunPy Priority Medium Non-urgent action required Effort Medium Requires a moderate time investment labels Mar 21, 2022
@ryuusama09

This comment was marked as outdated.

@nabobalis

This comment was marked as outdated.

@exitflynn

This comment was marked as outdated.

@nabobalis

This comment was marked as outdated.

@nabobalis nabobalis added the Good First Issue The best issues for new people to tackle! label Feb 22, 2024
@ryuusama09

This comment was marked as outdated.

@nabobalis

This comment was marked as outdated.

@ryuusama09

This comment was marked as outdated.

@ryuusama09

This comment was marked as outdated.

@nabobalis

This comment was marked as outdated.

@ryuusama09

This comment was marked as outdated.

@nabobalis

This comment was marked as outdated.

@ryuusama09

This comment was marked as outdated.

@nabobalis

This comment was marked as outdated.

@ryuusama09

This comment was marked as outdated.

@nabobalis

This comment was marked as outdated.

@ryuusama09

This comment was marked as outdated.

@ryuusama09

This comment was marked as outdated.

@nabobalis

This comment was marked as outdated.

@ryuusama09
Copy link
Contributor

ryuusama09 commented Mar 8, 2024

So after doing a bit of testing , I found that res._numfile == 0 in case of 0 matched warnings . more like the len(meta_list) ==0 which essentially means the same thing. Now to reproduce a server error , I removed the part which checks that start date <= end date. Even after this , the response object was looking same like in the former case. I think the server error status should be passed by the scraper to the client

@nabobalis

This comment was marked as outdated.

@ryuusama09

This comment was marked as outdated.

@nabobalis

This comment was marked as outdated.

@nabobalis

This comment was marked as outdated.

@ryuusama09

This comment was marked as outdated.

@nabobalis

This comment was marked as outdated.

@ryuusama09

This comment was marked as outdated.

@nabobalis

This comment was marked as outdated.

@ryuusama09

This comment was marked as outdated.

@nabobalis

This comment was marked as outdated.

@ryuusama09

This comment was marked as outdated.

@nabobalis

This comment was marked as outdated.

@ryuusama09

This comment was marked as outdated.

@nabobalis

This comment was marked as outdated.

@ryuusama09

This comment was marked as outdated.

@nabobalis

This comment was marked as outdated.

@ryuusama09

This comment was marked as outdated.

@nabobalis

This comment was marked as outdated.

@ryuusama09

This comment was marked as outdated.

@wtbarnes wtbarnes removed Package Novice Requires little knowledge of the internal structure of SunPy Good First Issue The best issues for new people to tackle! labels Mar 15, 2024
@nabobalis nabobalis added the Package Intermediate Requires some knowledge of the internal structure of SunPy label Mar 20, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Effort Medium Requires a moderate time investment Feature Request New feature wanted! net Affects the net submodule Package Intermediate Requires some knowledge of the internal structure of SunPy Priority Medium Non-urgent action required
Projects
None yet
Development

No branches or pull requests

6 participants