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

Throw BadRequestException instead of server error for SCIM2 users & groups filtering with invalid filter operation #531

Conversation

sadilchamishka
Copy link
Contributor

@sadilchamishka sadilchamishka commented Feb 10, 2024

…roups filtering with invalid filter operation
@jenkins-is-staging
Copy link

PR builder started
Link: https://github.com/wso2/product-is/actions/runs/7853504567

AnuradhaSK
AnuradhaSK previously approved these changes Feb 10, 2024
@@ -1405,7 +1405,7 @@ private UsersGetResponse filterUsersBySingleAttribute(ExpressionNode node, Map<S
if (isFilteringNotSupported(node.getOperation())) {
String errorMessage =
"Filter operation: " + node.getOperation() + " is not supported for filtering in users endpoint.";
throw new CharonException(errorMessage);
throw new BadRequestException(errorMessage);
Copy link
Contributor

Choose a reason for hiding this comment

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

Here you can pass the scimType variable as well

As per the attached screenshot, the value in scimType should go to details
scimType should be one of https://datatracker.ietf.org/doc/html/rfc7644#:~:text=A%20SCIM%20detail%20error%20keyword.%20%20See%20Table%209.%20%20OPTIONAL.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Hope this is the expected result improved by this commit - cc79a63
Screenshot 2024-02-10 at 16 21 05

@AnuradhaSK AnuradhaSK dismissed their stale review February 10, 2024 09:09

commented

@jenkins-is-staging
Copy link

PR builder completed
Link: https://github.com/wso2/product-is/actions/runs/7853504567
Status: success

Copy link

@jenkins-is-staging jenkins-is-staging left a comment

Choose a reason for hiding this comment

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

Approving the pull request based on the successful pr build https://github.com/wso2/product-is/actions/runs/7853504567

@sadilchamishka sadilchamishka merged commit 73b15d5 into wso2-extensions:master Feb 10, 2024
3 checks passed
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