Bug: scope error in server/index.js duplicate email handler #50
Labels
No Label
P0 Critical
P1 High
P2 Medium
P3 Low
accessibility
backend
bug
content
data-integrity
enhancement
frontend
infra
integration
owner
owner-input
performance
performance
phase-7
phase-8
security
seo
ui
ux
No Milestone
No project
No Assignees
1 Participants
Notifications
Due Date
No due date set.
Dependencies
No dependencies set.
Reference: null/Queue-North-Website#50
Loading…
Reference in New Issue
No description provided.
Delete Branch "%!s(<nil>)"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Issue
In
server/index.jsat lines 425-427, the code in the duplicate email error handler referencessanitized.emailand callsforwardToZoho(sanitized), but thesanitizedvariable is not in scope within thecatchblock.Location
server/index.jsExpected Behavior
When a duplicate email is submitted, the 409 Conflict response should be returned with a warning logged, and Zoho forwarding should still be attempted.
Actual Behavior
The code will fail with a ReferenceError because
sanitizedis not defined in the catch block scope, likely causing a 500 error instead of the proper 409 response.Fix
Move the
sanitizedvariable declaration before thetryblock so it's accessible in both thetryandcatchblocks: