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

Improve error handling for malformed query cursors #3066

Merged
merged 4 commits into from
Oct 10, 2024

Conversation

Swiddis
Copy link
Collaborator

@Swiddis Swiddis commented Oct 10, 2024

Description

Malformed cursors currently return a 500 status with exception messages -- this PR updates it to a tidier message with a 400 status.

Related Issues

N/A

Check List

  • New functionality includes testing.
  • New functionality has been documented.
  • New functionality has javadoc added.
  • New functionality has a user manual doc added.
  • API changes companion pull request created.
  • Commits are signed per the DCO using --signoff.
  • Public documentation issue/PR created.

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.
For more information on following Developer Certificate of Origin and signing off your commits, please check here.

Signed-off-by: Simeon Widdis <sawiddis@amazon.com>
Signed-off-by: Simeon Widdis <sawiddis@amazon.com>
Signed-off-by: Simeon Widdis <sawiddis@amazon.com>
seankao-az
seankao-az previously approved these changes Oct 10, 2024
Copy link
Collaborator

@ykmr1224 ykmr1224 left a comment

Choose a reason for hiding this comment

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

Seems you need reformat. Others looks good to me.

Signed-off-by: Simeon Widdis <sawiddis@amazon.com>
@Swiddis Swiddis merged commit 7477fd8 into opensearch-project:main Oct 10, 2024
11 of 14 checks passed
@Swiddis Swiddis deleted the bugfix/malformed-cursor branch October 10, 2024 21:09
opensearch-trigger-bot bot pushed a commit that referenced this pull request Oct 18, 2024
* Add reproducer for malformed cursor handling

Signed-off-by: Simeon Widdis <sawiddis@amazon.com>

* Handle malformed query cursors

Signed-off-by: Simeon Widdis <sawiddis@amazon.com>

* Move malformed cursor test to correct file

Signed-off-by: Simeon Widdis <sawiddis@amazon.com>

* Apply spotless

Signed-off-by: Simeon Widdis <sawiddis@amazon.com>

---------

Signed-off-by: Simeon Widdis <sawiddis@amazon.com>
(cherry picked from commit 7477fd8)
Signed-off-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backport 2.x bug Something isn't working v2.18.0 Issues targeting release v2.18.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants