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

More explicit error for removed Query extension #615

Merged
merged 3 commits into from
Jul 8, 2024

Conversation

Ariana-B
Copy link
Contributor

@Ariana-B Ariana-B commented Jul 2, 2024

While the STAC API Query extension was previously implemented, it suffered from the same flaws in logic as the other API extensions, which meant that while it would return correct results, they risked being oddly distributed when pagination was involved. Since it is recommended to implement the Filter extension instead of Query, and since correctly re-implementing Query was not trivial, it was dropped in favour of Filter.
As mentioned in #611, pystac_client will warn users if they try to use query, but will still return results without issue. The api itself will similarly quietly ignore query if provided.
To avoid any silent failure issues down the line, return a 400 error if the request includes a query argument.


📚 Documentation preview 📚: https://datacube-explorer--615.org.readthedocs.build/en/615/

@Ariana-B Ariana-B requested review from omad and robbibt July 2, 2024 06:04
@robbibt
Copy link

robbibt commented Jul 2, 2024

Hey @Ariana-B, this looks great. Is there any way I can test this on the STAC endpoint before merging? If not, I'll just test it out after we merge and release a new Explorer version

@Ariana-B Ariana-B linked an issue Jul 5, 2024 that may be closed by this pull request
Copy link

@robbibt robbibt left a comment

Choose a reason for hiding this comment

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

This looks great to me - let's merge this and I'll double check it once it's live 🙂

@Ariana-B Ariana-B merged commit 5100d50 into develop Jul 8, 2024
9 checks passed
@Ariana-B Ariana-B deleted the better_query_error branch July 8, 2024 06:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add error or more direct warning to deprecated "query" extension
2 participants