-
Notifications
You must be signed in to change notification settings - Fork 550
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
Add error code for duplicate claim value error code #6477
base: master
Are you sure you want to change the base?
Add error code for duplicate claim value error code #6477
Conversation
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## master #6477 +/- ##
============================================
+ Coverage 46.78% 46.95% +0.17%
- Complexity 15348 15435 +87
============================================
Files 1747 1747
Lines 107449 106781 -668
Branches 19887 19815 -72
============================================
- Hits 50272 50144 -128
+ Misses 50003 49490 -513
+ Partials 7174 7147 -27
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. |
…' into duplicate-claim-value-error-code
…' into duplicate-claim-value-error-code
…' into duplicate-claim-value-error-code
|
Purpose
When one or more attributes are configured as unique, and we attempt to register via the Self-Register API (https://localhost:9443/api/identity/user/v1.0/me) with a claim value already in use by another user (e.g., Mobile Number), the system responds with the following error:
{
"code": "20035",
"message": "Bad Request",
"description": "The value defined for Mobile is already in use by different user!",
"traceId": "92c0ae8e-da20-46a8-a181-81e27033c472"
}
The error code 20035 is currently defined for password policy violations.
Implementation
This PR fix the issue by introducing a new error code, ERROR_CODE_DUPLICATE_CLAIM_VALUE = "60007", in SelfRegistrationStatusCodes. In the duplicate claim value PolicyViolationException this error code is thrown with the error.
Related Issue