Skip to content

Returned detailed message when query validation rules not configured #3041

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

Open
wants to merge 6 commits into
base: integration
Choose a base branch
from

Conversation

lbschanno
Copy link
Collaborator

Currently, when query validation rules are not configured for a ShardQueryLogic bean, the resulting exception and message is identical to the default UnsupportedOperationException thrown by the QueryLogic interface. This is misleading, since the operation is supported, but additional configuration is required.

Update the ShardQueryLogic to instead throw a BadRequestQueryException with the error code 412-19 and a message indicating that query validation rules need to be configured for the underlying logic before validation can proceed.

Additionally, add the option -VQ | --validateQuery to the quickstart datawaveQuery function to make the command post a query to the validate endpoint.

Currently, when query validation rules are not configured for a
ShardQueryLogic bean, the resulting exception and message is identical
to the default UnsupportedOperationException thrown by the QueryLogic
interface. This is misleading, since the operation is supported, but
additional configuration is required.

Update the ShardQueryLogic to instead throw a BadRequestQueryException
with the error code 412-19 and a message indicating that query
validation rules need to be configured for the underlying logic before
validation can proceed.

Additionally, add the option -VQ | --validateQuery to the quickstart
datawaveQuery function to make the command post a query to the validate
endpoint.
foster33
foster33 previously approved these changes Jul 18, 2025
Copy link
Collaborator

@foster33 foster33 left a comment

Choose a reason for hiding this comment

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

Tested & LGTM

@lbschanno lbschanno requested a review from ivakegg July 22, 2025 14:15
foster33
foster33 previously approved these changes Aug 1, 2025
…ry/exception/DatawaveErrorCode.java

Co-authored-by: Mr. Patrickus Agbius  <[email protected]>
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.

3 participants