Skip to content

feat: enrich identity conflict responses with member ids (CM-1349) - #4428

Merged
skwowet merged 1 commit into
mainfrom
CM-1349-identity-conflict-member-ids
Aug 3, 2026
Merged

feat: enrich identity conflict responses with member ids (CM-1349)#4428
skwowet merged 1 commit into
mainfrom
CM-1349-identity-conflict-member-ids

Conversation

@skwowet

@skwowet skwowet commented Aug 3, 2026

Copy link
Copy Markdown
Collaborator

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

  • Look up conflictMemberId on verified-identity unique violations for create member, create identity, and verify identity
  • Gate the lookup with isMemberIdentityDbConflict so non-conflict errors skip the extra query
  • Move optional context onto HttpError so 409 responses include it in the JSON body
  • Pass error.context through the public API error handler for Slack alerts

Signed-off-by: Yeganathan S <63534555+skwowet@users.noreply.github.com>
Copilot AI review requested due to automatic review settings August 3, 2026 15:47

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

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.

Comment thread backend/src/api/public/v1/members/createMember.ts
Comment thread services/libs/common/src/errors/http.ts
@skwowet
skwowet merged commit 78bd7ed into main Aug 3, 2026
16 checks passed
@skwowet
skwowet deleted the CM-1349-identity-conflict-member-ids branch August 3, 2026 16:22
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.

2 participants