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

Alerce query fails with error from tom-demo-dev #601

Open
rachel3834 opened this issue Feb 2, 2023 · 3 comments
Open

Alerce query fails with error from tom-demo-dev #601

rachel3834 opened this issue Feb 2, 2023 · 3 comments
Assignees
Labels
bug Something isn't working Data Services Data Services

Comments

@rachel3834
Copy link
Contributor

rachel3834 commented Feb 2, 2023

Describe the bug
Running an Alerce query (query 10, Galactic Bulge query) from tom-demo-dev's UI produces the following error:
400 Client Error: BAD REQUEST for url: https://api.alerce.online/ztf/v1/objects/?count=false&order_by=None&order_mode=None&page=1&page_size=20&ra=17.5&dec=-27.0&radius=60

To Reproduce

  1. Go to tom-demo-dev, click Alerts
  2. Run the Alerce query labeled 'Galactic Bulge' (10 in list)

Expected behavior
I expect the query to return a list of targets or an empty list indicating there were no targets found.

Desktop (please complete the following information):

  • OS: MacOS Ventura 13.1
  • Browser Chrome

Additional context
Would be nice to fix, but not super urgent.

@rachel3834 rachel3834 added the bug Something isn't working label Feb 2, 2023
@rachel3834
Copy link
Contributor Author

Actually, looks like Alerce queries are failing because they have changed their query string requirements; I'm getting the same error if I submit the query from a test TOM.

This makes it higher priority

@rachel3834
Copy link
Contributor Author

More debugging info. The Alerce query form I am submitting sends the following query to Alerce:
https://api.alerce.online/ztf/v1/objects/?count=false&order_by=None&order_mode=None&page=1&page_size=20&ra=295.3245&dec=40.186667&radius=120
(I'm doing a simple cone search on these coordinates)

The specific errors produced are:
{"errors": {"order_by": "Column used for ordering The value 'None' is not a valid choice for 'order_by'."}, "message": "Input payload validation failed"}
{"errors": {"order_mode": "Ordering could be ascendent or descendent The value 'None' is not a valid choice for 'order_mode'."}, "message": "Input payload validation failed"}

These two key words appear to be the problem in my query. According to the Alerce API documentation both of these parameters accept a range of set values but cannot be None.

These parameters also don't appear to be essential, I suggest the parameters simply be removed from the query string, or use default values of:
order_by: oid
order_mode: ASC

@phycodurus phycodurus self-assigned this Feb 2, 2023
@github-project-automation github-project-automation bot moved this to Backlog in TOM Toolkit Feb 2, 2023
@phycodurus phycodurus linked a pull request Feb 2, 2023 that will close this issue
@jchate6 jchate6 added the Data Services Data Services label Jan 20, 2024
@jchate6
Copy link
Contributor

jchate6 commented Jan 20, 2024

Is this issue still live?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working Data Services Data Services
Projects
Status: Backlog
Development

Successfully merging a pull request may close this issue.

3 participants