Unawaited async call in a Server Action or route handler
Why it matters
Once the response is sent, serverless platforms freeze or stop the function: work nobody awaits may never finish, and its errors are lost.
Fix
Await it, or schedule it with after() from next/server to run after the response.
Credit
From Vercel
The react-best-practices skill and Next.js docs schedule post-response work with after() rather than leaving promises unawaited.
References
- afterNext.js
- react-best-practices: Use after() for non-blocking operationsVercel (vercel-labs/agent-skills)
- @vercel/functions API reference (waitUntil)Vercel