Skip to content

Code

Database write is never awaited, so it never runscode.unawaited-query

Prisma, Supabase, Drizzle and Mongoose build queries lazily: the query is only sent when it is awaited (or `.then()` is called). Written as a plain statement, the insert/update/delete silently does nothing, and any error is lost. The page says "Saved!" and nothing was saved.

  • In force Rule code.unawaited-query
  • 3 clauses

At a glance

code.unawaited-query
Severitymedium
CertaintyObserved — the code as written is the problem
Looks atyour source code
When it runsRuns on every scan

How to fix it

Put `await` in front of it inside an async function (`await prisma.user.update(...)`) and handle the error.

Check your own app

Run npx scanlyfix scan in your project. Every finding gets an id; after fixing, npx scanlyfix verify <id> proves it is gone.

If it is a false positive in your project, silence that one line with // scanlyfix-ignore-next-line code.unawaited-query -- <why>.

All rules

Your code stays
on your machine

Only findings are uploaded, and only to your own dashboard.