Skip to content

Unwrap scim errors when possible for patch validation #187

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 1 commit into
base: master
Choose a base branch
from

Conversation

Achooo
Copy link

@Achooo Achooo commented Apr 23, 2025

Fixes #186

Attempt to fix the scimErrors that are overwritten in the patch validation logic. Feel free to modify / close this PR, just a proposed fix 💯

@Achooo Achooo force-pushed the ash/issue-186-fix-patch-errors branch from 543ec92 to b679fb0 Compare April 23, 2025 01:17
}
value, err := validator.Validate()
if err != nil {
return nil, &errors.ScimErrorInvalidValue
Copy link
Author

Choose a reason for hiding this comment

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

New logic to unwrap the underlying scim error (this does assume/require underlying errors returned are pointers as best practice to work properly, which does seem to be the case).

Please let me know if any other tests should be added as I only noticed the handlers_test.go tests. 🙏🏽

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.

Patch validation errors are swallowed (defaults to ScimErrorInvalidValue)
1 participant