Description
sendWithRetry in \lib/webhook/dispatcher.js\ (line 72) is an async function called **without \�wait**. Similarly, \emitWebhookEvent\ in \�pp/api/attendance/record/route.js\ (line 63) is also called without \�wait.
Impact
- If the webhook endpoint is down, the \etch\ inside \sendWithRetry\ rejects and becomes an unhandled Promise rejection (Node.js emits \unhandledRejection, potentially crashing the process).
- The HTTP response to the client is sent before the webhook fires, meaning the client gets a success response even though the webhook delivery may still be in-flight or might fail silently.
Files
- \lib/webhook/dispatcher.js:72-79\ — \sendWithRetry(...)\ not awaited inside the loop
- \�pp/api/attendance/record/route.js:63-70\ — \emitWebhookEvent(...)\ not awaited before returning response
Suggested Fix
Add \�wait\ before both calls and wrap in try/catch to handle errors gracefully.
Description
sendWithRetry in \lib/webhook/dispatcher.js\ (line 72) is an async function called **without \�wait**. Similarly, \emitWebhookEvent\ in \�pp/api/attendance/record/route.js\ (line 63) is also called without \�wait.
Impact
Files
Suggested Fix
Add \�wait\ before both calls and wrap in try/catch to handle errors gracefully.