Async Errors
- What does UnhandledPromiseRejectionWarning mean in Node.js?
It means a Promise was rejected and no .catch() or try/catch handled the rejection, so Node.js warns you about the unhandled error. - How do I fix a deadlock in async code?
Fix a deadlock by ensuring locks are acquired in a consistent order, using timeouts, or avoiding blocking calls inside async functions that hold a lock. - Why does my promise never resolve?
A promise stays pending when its resolve or reject function is never called, or when it waits on something that never happens. Look for a missing resolve call, an event that never fires, or a promise that was never returned. - Why does my async function return a Promise instead of a value?
An async function always returns a Promise, even when you return a plain value. Use await inside another async function, or call then, to read the result.