feat: enrich identity conflict responses with member ids (CM-1349) - #4428
Merged
Conversation
Signed-off-by: Yeganathan S <63534555+skwowet@users.noreply.github.com>
Contributor
There was a problem hiding this comment.
Pull request overview
Enriches public API identity-conflict responses and Slack alerts with the member currently owning the verified identity.
Changes:
- Adds conflict detection and owner lookup across member identity operations.
- Adds optional context to all HTTP error responses.
- Passes HTTP error context to public API alerts.
Reviewed changes
Copilot reviewed 6 out of 6 changed files in this pull request and generated 4 comments.
Show a summary per file
| File | Description |
|---|---|
services/libs/common/src/errors/http.ts |
Adds serialized HTTP error context. |
backend/src/utils/err.ts |
Adds identity-conflict detection. |
backend/src/api/public/v1/members/createMember.ts |
Looks up conflicting identity owner. |
backend/src/api/public/v1/members/identities/createMemberIdentity.ts |
Enriches creation conflicts. |
backend/src/api/public/v1/members/identities/verifyMemberIdentity.ts |
Enriches verification conflicts. |
backend/src/api/public/middlewares/errorHandler.ts |
Includes context in alerts. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Adds conflicting member ownership to public API identity 409 alerts and responses so ops and clients can see who already holds the identity.
Changes
conflictMemberIdon verified-identity unique violations for create member, create identity, and verify identityisMemberIdentityDbConflictso non-conflict errors skip the extra querycontextontoHttpErrorso 409 responses include it in the JSON bodyerror.contextthrough the public API error handler for Slack alerts