Zum Inhalt springen

Async Error Swallowed (ARCH3169)

Dieser Inhalt ist noch nicht in deiner Sprache verfügbar.

Key typescript.logging.floating-promise · Severity warning · Category logging

Unawaited promises, fire-and-forget calls, and rejected promises with no catch cause failures to vanish untracked. A rejection becomes an unhandled rejection that can crash the Node process.

function onRequest(req: Request) {
audit.record(req); // returns a promise, not awaited, no catch
respond(req);
}
function onRequest(req: Request) {
audit.record(req).catch((err) => {
logger.error("audit record failed", { err });
});
respond(req);
}

Await the promise or attach a .catch handler, and log the rejection.