Function: isMemberContactConflict()
isMemberContactConflict(
error):MemberContactConflict|null
Defined in: packages/sdk/src/types/member-types.ts:364
Narrow an unknown thrown value to a member contact conflict.
Deliberately structural rather than an instanceof ApiError check, so the
guard works on errors that crossed a React Query boundary or were re-wrapped.
A conflict with a null conflictingMemberId still matches — it is a real
conflict and its message is the right thing to show. Callers that want to
render the resolution UI should branch on canRelease, which is the field
that actually answers "is there something to do about this".
Only code and the id's shape are validated, deliberately. conflictField,
canRelease and conflictingMemberArchived come from the same server
response as code; re-validating them would turn a server that added a new
conflictField value into a silent "not a conflict at all", which is a worse
failure than rendering an unfamiliar noun. The id is checked because callers
pass it back as a member id.
Parameters
error
unknown
Returns
MemberContactConflict | null