Conversation
Co-authored-by: Cursor <cursoragent@cursor.com>
backend/src/api/public/v1/members/work-experiences/verifyMemberWorkExperience.ts
Outdated
Show resolved
Hide resolved
backend/src/api/public/v1/members/identities/verifyMemberIdentity.ts
Outdated
Show resolved
Hide resolved
backend/src/api/public/v1/members/work-experiences/verifyMemberWorkExperience.ts
Outdated
Show resolved
Hide resolved
joanagmaia
left a comment
There was a problem hiding this comment.
@skwowet only 1 endpoint missing at this point which is to get the project affiliations with the associated maintainers roles services/apps/data_sink_worker/src/service/member.service.ts.
We can add this after, non-blocking for the PR
| await qx.tx(async (tx) => { | ||
| await cleanSoftDeletedMemberOrganization(tx, memberId, data.organizationId, data) | ||
|
|
||
| newMemberOrgId = await createMemberOrganization(tx, memberId, memberOrgData) |
There was a problem hiding this comment.
If createMemberOrganization fails to insert undefined is returned because on conflict do nothing returning id means that if there is a conflict do nothing but if there is no conflict insert and return id. Meaning that in case of a conflict we don't get existing id from the db so we return undefined... Meaning that end result could be NotFoundError('Work experience not found after creation') even though we could create work experience for existing org.
There was a problem hiding this comment.
Updated it so that the query now uses a CTE with UNION ALL to fall back to selecting the existing row on conflict.
backend/src/api/public/v1/members/identities/verifyMemberIdentity.ts
Outdated
Show resolved
Hide resolved
backend/src/api/public/v1/members/identities/verifyMemberIdentity.ts
Outdated
Show resolved
Hide resolved
backend/src/api/public/v1/members/work-experiences/createMemberWorkExperience.ts
Show resolved
Hide resolved
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes and found 1 potential issue.
Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, have a team admin enable autofix in the Cursor dashboard.
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes and found 2 potential issues.
Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, have a team admin enable autofix in the Cursor dashboard.
| ] | ||
| : []), | ||
| ], | ||
| ) |
There was a problem hiding this comment.
Unawaited promise may cause unhandled rejection crash
Low Severity
sendSlackNotification returns a Promise that is neither awaited nor has a .catch() handler. If the Slack call fails (e.g., network timeout), the rejected promise becomes an unhandled rejection, which can crash the Node.js process depending on the runtime configuration.


Note
Cursor Bugbot is generating a summary for commit a1b3652. Configure here.