---
title: "Troubleshooting"
description: "Fixes indexed by symptom: pnpm can't resolve components, the sign-in code never arrives, builds that never exit, start_push 500, sessions after changing AUTH_SECRET, and every log code the package writes."
canonical_url: "https://nuxt-backend.dev/docs/ship/operate/troubleshooting"
---
# Troubleshooting

> Fixes indexed by symptom: pnpm can't resolve components, the sign-in code never arrives, builds that never exit, start_push 500, sessions after changing AUTH_SECRET, and every log code the package writes.

Version: nuxt-backend 0.6.x · Tab: Ship · Kind: reference · Status: stable

Every page: [llms.txt](https://nuxt-backend.dev/llms.txt) · Skill for coding agents: [nuxt-backend](https://nuxt-backend.dev/.well-known/skills/nuxt-backend/SKILL.md)

Commands use npm; use your project's package manager.

Find your symptom below, or the log code you saw. Start with `npx nuxt-backend doctor`: most of what follows is a finding with a fix hint. Something broke in production? [Respond to incidents](https://nuxt-backend.dev/docs/ship/operate/runbooks) has the runbooks, and [Get help](https://nuxt-backend.dev/docs/ship/operate/help) says what to send when nothing here fits.

## `convex dev` can't resolve `@convex-dev/…/convex.config`

**Symptom:** the push fails resolving a component definition imported by `backend/convex.config.ts`.

**Cause:** pnpm's default isolated linker hides transitive packages, and Convex's bundler resolves the `@convex-dev/*` component definitions from your project root.

**Fix:** let them hoist, from `pnpm-workspace.yaml` (pnpm 11+ no longer reads such settings from `.npmrc`):

```yaml [pnpm-workspace.yaml]
publicHoistPattern:
  - '@convex-dev/*'
```

(or `nodeLinker: hoisted`), then reinstall.

## The sign-in code never arrives

**Symptom:** "request code" answers *"This app is in test mode and only emails test addresses, so this address can't receive mail here"* or *"This app can't send email yet"*, or succeeds but no email comes.

**Cause:** no email transport (`EMAIL_API_KEY` is unset), test mode, or no `EMAIL_FROM` in production. The package refuses a code it knows would not arrive ([Get email into inboxes](https://nuxt-backend.dev/docs/build/email/delivery/deliverability)), and logs `email.undeliverable` with the setting to change.

**Fix:**

- In development you don't need email. On a deployment whose `BACKEND_ENVIRONMENT` is `development`, every code prints where Convex's function logs go: the **nuxt-backend dev terminal**.
- Outside production, email runs in test mode: only Resend's test addresses (`delivered@resend.dev`, with any `+label`) receive mail. Sign in with one, and read the code in the [dev inbox](https://nuxt-backend.dev/docs/develop/dev-inbox).
- In production, `EMAIL_FROM` must be an address on a domain verified in Resend.
- The `doctor` findings `email-transport` and `deployment-email-api-key` tell you which case you are in.

## `nuxt build` or `generate` never exits

**Symptom:** the build finishes compiling, the prerender crawl starts, and the process hangs.

**Cause:** the crawler rendered a page that opens a live Convex WebSocket (`useQuery` subscriptions), which keeps the event loop alive. The module's own pages are never prerendered; this is one of the app's.

**Fix:** exclude the app's live pages from prerendering:

```ts [nuxt.config.ts]
export default defineNuxtConfig({
  routeRules: {
    '/app/**': { prerender: false },
  },
})
```

## `start_push 500` on `convex dev` / `deploy`

**Symptom:** the push fails with an opaque `start_push 500` while evaluating the definition bundle.

**Cause:** Convex discovers components by intercepting every `convex.config` import while bundling `convex.config.ts`, and current backends crash when such an import is reached through an **intermediate module** (a helper that imports component definitions for you) or when `app.use` runs in a loop.

**Fix:** keep the scaffolded shape: every component imported and mounted **in the root convex.config.ts**, one `app.use()` per component. Never wrap the definitions in a helper module. `nuxt-backend/app` deliberately exports only the env contract (`backendEnv`) for that reason.

## Sessions fail after changing `AUTH_SECRET` by hand

**Symptom:** after changing `AUTH_SECRET` with `convex env set`, sign-in loops, or the `/api/auth` proxy answers 5xx on token requests.

**Cause:** `AUTH_SECRET` signs sessions **and** encrypts the RS256 private keys stored in the backend component's `jwks` table. With a new secret the stored keys can no longer be decrypted, so no JWT can be signed; existing sessions are invalid regardless.

**Fix:** clear the stored keys so fresh ones are generated on the next request. In the Convex dashboard, open the `backend` component's data and delete the rows of the `jwks` table (or run a one-off mutation on `components.backend.adapter.deleteMany` with `{ model: 'jwks' }`). Every user signs in again. To change the secret with nobody signed out, run `npx nuxt-backend env rotate AUTH_SECRET` ([Rotate secrets](https://nuxt-backend.dev/docs/ship/security/secrets)) instead of setting it by hand.

## Pricing is empty although the catalog synced

**Symptom:** `useBilling().products` is `{}` / the pricing page shows nothing, but `billing sync` created the products.

**Cause:** `getConfiguredProducts` reads the reactive products table, which fills from `product.*` webhooks, and the webhook endpoint is created by the same sync run, *after* the products.

**Fix:** `billing sync` runs `billing:syncProducts` itself. If it reported the products as not loaded, the deployment lacked `BILLING_ACCESS_TOKEN`, or its `BACKEND_ENVIRONMENT` bills in another Polar environment than the one you synced. Fix that, then run `npx convex run billing:syncProducts` (add `--prod` for production). `billing.generated.ts` holds the sandbox ids and the production ids apart. Also check that `appConfig.backend.billing.plans[].key` matches the catalog keys.

## Credits don't update after a top-up / "Credit balance not synced yet"

**Cause:** `/billing/events` isn't receiving or verifying events (`BILLING_WEBHOOK_SECRET` unset → `503`, wrong secret → `403`, dashboard pointed at the wrong URL → nothing).

**Fix:** `doctor` (`billing-webhook-route`), then the delivery log in the DevTools Backend tab, whose outcome column names the failure. As a fallback, `useCredits().refresh()` runs `syncEntitlements` and pulls the balance directly.

## `useEmailStatus` stays at `sent` on a local deployment

**Cause:** Resend posts its delivery events to a public URL, and a local deployment has none, so no event reaches `/email/events`.

**Fix:** develop on a cloud dev deployment, or run a tunnel to the local one, and point Resend's webhook there with `EMAIL_WEBHOOK_SECRET` set. Then a send to `delivered@resend.dev` or `bounced@resend.dev` moves the status. The status moves only for an email sent with `EMAIL_API_KEY`: with no key, `send` returns `null`, so there is nothing to track ([Resend](https://nuxt-backend.dev/docs/services/resend#link-it)).

## Invitation links 404

**Cause:** the deployment emails a path other than `backend.pages.acceptInvitation`, where the Nuxt page mounts: its code predates the generated `paths.generated.ts`, or `backend/auth.ts` does not pass its `paths` to `setupAuth`.

**Fix:** run `npx nuxt-backend doctor --fix`, which rewrites the paths file, pass `paths` on as the scaffold does, and push the functions. `doctor`'s `page-paths` finding compares the deployment with `nuxt.config`. Also make sure `SITE_URL` is the app's origin, never the `.convex.site` URL: links are built from it.

## A composable returns `undefined` forever

**Symptom:** `useBilling` / `useCredits` / `useGifts` / `useFeatures` / `useEmailStatus` never load; or `useAuth` has no user.

**Cause:** the deployment lacks a function the composable binds to by name: a scaffolded file was renamed or its exports trimmed.

**Fix:** `doctor`'s `function-contract` finding lists the missing `module:export` names. Restore with `npx nuxt-backend init` (existing files untouched) and let `convex dev` push. If you renamed on purpose, pass `{ api }` to the composable.

## `/login` shows the Nuxt welcome page

**Cause:** `app/app.vue` is still the `create nuxt` starter, with `<NuxtWelcome />` and no `<NuxtPage />`. So the route resolves (the page guard even redirects there) but nothing renders it. The dev console says so: "app.vue still renders <nuxt-welcome>

and no <nuxt-page>

".

</nuxt-page>
</nuxt-welcome>



**Fix:** replace `<NuxtWelcome />` with `<NuxtPage />`, or run `npx nuxt-backend init` while the file is untouched. Replacing it by hand, give the app a page at `/` as well ([The home page answers 404](#the-home-page-answers-404)).

## The home page answers 404

**Symptom:** `/login` renders, but `/` is a 404, and the dev log says `[VUE_ROUTER_R0004] No match found for location with path "/"`.

**Cause:** the module's pages turn on Nuxt's router, which renders only the pages it has, and the app has none at `/`. The minimal `create nuxt` template has no `app/pages/` at all.

**Fix:** run `npx nuxt-backend init`. When the root component renders `<NuxtPage />` and no page answers `/`, it writes `app/pages/index.vue`: the app's name and a link to sign in, or to the account once signed in, for you to make your own. It writes none over a file, nor in an app that extends a layer, which may serve `/` itself. Or add `app/pages/index.vue` yourself.

## `npm run dev` stops at "Preparing Convex functions" and Nuxt never starts

**Cause:** the `dev` script is `convex dev --start "nuxt dev"` (`nuxt-convex-module` writes it on `nuxt prepare` when `convex.devScript` is on). On a new deployment its first push fails on the missing `AUTH_SECRET` and `SITE_URL`, Convex starts Nuxt only after a successful push, and those values are provisioned from inside Nuxt.

**Fix:** `npx nuxt-backend doctor --fix` points the script at [`nuxt-backend dev`](https://nuxt-backend.dev/docs/reference/cli#dev), which provisions the env first. `doctor` reports the script as `dev-script`.

## `npx convex dev` says "add `convex` to your package.json dependencies"

**Cause:** `convex` is this package's peer dependency. A package manager installs it, but never writes it to your own `package.json`, and the Convex CLI reads that file before it runs.

**Fix:** `npm install convex` (or run `npx nuxt-backend init`, which adds the line when it is missing).

## `convex dev` says "A local backend is still running on port 3210"

**Cause:** an earlier run of `convex dev` itself (not through `nuxt-backend dev`) was stopped with SIGTERM (a plain `kill`, which is how coding agents and process managers stop a process), or any run was ended with `kill -9`. The Convex CLI exits on SIGTERM but leaves the local backend and the Nuxt server running, so the next run finds the port taken. `nuxt-backend dev`, the `dev` script `init` sets, passes SIGINT and SIGTERM on to Convex as SIGINT, so it shuts all three down either way.

**Fix:** stop what that run left behind, then run `dev` again. On macOS and Linux, list what listens on the default ports with `lsof -nP -iTCP:3210 -iTCP:3000 -sTCP:LISTEN`, then `kill <pid>` the `convex-local-backend` and the `node` process from that run; port 3000 may belong to another app. On Windows, end `convex-local-backend.exe` and the old `node` process in Task Manager. Stop a bare `convex dev` with Ctrl-C (SIGINT) or `kill -INT <pid>` next time: that shuts down all three.

## The built server answers 500: `Cannot find module '…/convex/dist/esm/index.js'`

**Cause:** Nuxt 4.6 changed how a production build resolves a module runtime's imports, and `nuxt-convex-module` before 0.11 let it inline the Convex client with an import that points outside `.output`. `nuxt build` succeeds and `nuxt dev` works; every request to the built server fails, on a Node server or in a Vercel function.

**Fix:** this package depends on `nuxt-convex-module` 0.11 or later, which avoids it. If a lockfile still holds 0.10, update it (`npm update nuxt-convex-module`). Adding `vite: { resolve: { dedupe: ['convex'] } }` to `nuxt.config.ts` fixes it too.

## Gated pages return `500 NUXT_PUBLIC_CONVEX_SITE_URL is not set` on the host

**Cause:** the production build has no backend URL. The page guard verifies the session on the server through the backend's HTTP-actions origin, and the underlying Convex module raises this (its own name for the variable) when that origin is unknown. Pages without the middleware still render, which is why the home page works and the account pages don't.

**Fix:** set `NUXT_PUBLIC_BACKEND_URL` on the host: the `.convex.site` origin is derived from a `*.convex.cloud` URL ([the env split](https://nuxt-backend.dev/docs/ship/deploy#the-env-split)). For a custom domain or a self-hosted backend, set `NUXT_PUBLIC_CONVEX_SITE_URL` too ([Self-host and add domains](https://nuxt-backend.dev/docs/ship/deploy/self-hosting)).

## Sign-in fails from `http://localhost:<port>`

**Cause:** `SITE_URL` is the only trusted browser origin, and it defaults to `http://localhost:3000` on dev deployments. Another port, or `127.0.0.1`, is a different origin. A deployment whose `BACKEND_ENVIRONMENT` is `development` trusts local origins on any port, so the deployment you sign in to runs in another environment.

**Fix:** run `npx nuxt-backend env push` against the dev deployment, which sets `BACKEND_ENVIRONMENT=development`, or set `SITE_URL` to the exact origin.

## Type errors on `#backend/*` before the first `convex dev`

The module ships fallback ambient types for `#backend/*` until `_generated/api` exists, and re-renders them the moment codegen appears. If types stay stale, restart the dev server after the first `convex dev` run.

## Log codes

Every line the package writes to the deployment's logs reads `[nuxt-backend] <code>: <message>`, so a search for the code in the Convex dashboard's logs finds each occurrence. No line names a person: addresses, names and subjects stay out, because Convex keeps logs. The one exception is `auth.otp_echo`, which only a `development` deployment writes.

<table>
<thead>
  <tr>
    <th>
      Code
    </th>
    
    <th>
      Level
    </th>
    
    <th>
      What happened
    </th>
    
    <th>
      What to do
    </th>
  </tr>
</thead>

<tbody>
  <tr>
    <td>
      <code>
        auth.otp_echo
      </code>
    </td>
    
    <td>
      warn
    </td>
    
    <td>
      A sign-in code was printed, because the deployment's <code>
        BACKEND_ENVIRONMENT
      </code>
      
       is <code>
        development
      </code>
      
      .
    </td>
    
    <td>
      Nothing in development. No other environment prints codes.
    </td>
  </tr>
  
  <tr>
    <td>
      <code>
        email.skipped_no_api_key
      </code>
    </td>
    
    <td>
      warn
    </td>
    
    <td>
      An email was not sent: <code>
        EMAIL_API_KEY
      </code>
      
       is not set.
    </td>
    
    <td>
      Set it, or ignore it on a dev deployment, which prints sign-in codes.
    </td>
  </tr>
  
  <tr>
    <td>
      <code>
        email.skipped_unsubscribed
      </code>
    </td>
    
    <td>
      info
    </td>
    
    <td>
      An email under a topic was not sent: its recipient is not in the topic. They left it, never joined a topic that is off by default, or have not pressed a double opt-in's confirmation link yet. <code>
        send
      </code>
      
       resolved <code>
        null
      </code>
      
      .
    </td>
    
    <td>
      Nothing to fix: it is the person's choice. To see it, read their topics with <code>
        useEmailPreferences
      </code>
      
       or on the profile (<a href="https://nuxt-backend.dev/docs/build/email/preferences">
        Let people choose their emails
      </a>
      
      ).
    </td>
  </tr>
  
  <tr>
    <td>
      <code>
        email.skipped_capped
      </code>
    </td>
    
    <td>
      info
    </td>
    
    <td>
      A non-transactional email was not sent: its recipient already got <code>
        caps.perWeek
      </code>
      
       of them in the last 7 days.
    </td>
    
    <td>
      Raise <code>
        perWeek
      </code>
      
       on <code>
        setupEmail({ caps })
      </code>
      
      , or send fewer. A lifecycle flow moves on to its next step.
    </td>
  </tr>
  
  <tr>
    <td>
      <code>
        email.skipped_sunset
      </code>
    </td>
    
    <td>
      info
    </td>
    
    <td>
      A non-transactional email was not sent: its recipient has not clicked an email or used the app for <code>
        caps.sunsetAfterDays
      </code>
      
       (180 by default). Opens never count.
    </td>
    
    <td>
      Nothing to fix: their first click or sign-in brings them back. Lower the rule's reach with a larger <code>
        sunsetAfterDays
      </code>
      
      .
    </td>
  </tr>
  
  <tr>
    <td>
      <code>
        email.preferences_unsynced
      </code>
    </td>
    
    <td>
      warn
    </td>
    
    <td>
      A person's topic choices did not reach the email provider's contact after a few tries. The deployment's copy holds them, and every send under a topic reads that copy, so nobody gets mail they left. Or an account's old address, after it changed, could not be removed from the provider's contacts.
    </td>
    
    <td>
      Check <code>
        EMAIL_API_KEY
      </code>
      
       is a full-access key (<code>
        npx nuxt-backend doctor
      </code>
      
      , <code>
        email-key-permission
      </code>
      
      ). The next change of the person's choices writes the contact again; an old address stays a contact until you remove it at the provider.
    </td>
  </tr>
  
  <tr>
    <td>
      <code>
        email.announcement_refused
      </code>
    </td>
    
    <td>
      warn
    </td>
    
    <td>
      The email provider refused to create, send or cancel an announcement's broadcast; the administrator sees it refused as <code>
        unavailable
      </code>
      
       (<code>
        provider_refused
      </code>
      
      ), and the provider's words follow the line.
    </td>
    
    <td>
      Check <code>
        EMAIL_API_KEY
      </code>
      
       is a full-access key and the sender's domain is verified, then send again from the Announcements tab: a broadcast the provider made already is sent by its id, never made twice.
    </td>
  </tr>
  
  <tr>
    <td>
      <code>
        email.event_unsent
      </code>
    </td>
    
    <td>
      warn
    </td>
    
    <td>
      An event failed at the email provider: a lifecycle flow's or one <code>
        email.automations.track
      </code>
      
       sent. Resend refused it, rate-limited it five times, or its answer was lost. It is not sent again, so its automation starts at most once: a lost answer may have started it, anything else did not. The provider's words follow the line.
    </td>
    
    <td>
      Check <code>
        EMAIL_API_KEY
      </code>
      
       and the provider's status; a flow's email is not sent again, and an app's event is tracked again by the next call.
    </td>
  </tr>
  
  <tr>
    <td>
      <code>
        email.lifecycle_unstarted
      </code>
    </td>
    
    <td>
      warn
    </td>
    
    <td>
      A new account's sign-up did not reach the lifecycle flows: none of the sign-up flows (<code>
        welcome
      </code>
      
      , <code>
        activationNudge
      </code>
      
      ) started for it, and the packaged welcome email went instead. The account was created.
    </td>
    
    <td>
      Read the error after the line. The flows are not started again for this account.
    </td>
  </tr>
  
  <tr>
    <td>
      <code>
        email.lifecycle_failed
      </code>
    </td>
    
    <td>
      warn
    </td>
    
    <td>
      A billing event did not reach the lifecycle flows it starts or stops; the event itself is recorded.
    </td>
    
    <td>
      Read the error after the line. The flows it would have started do not run for this event.
    </td>
  </tr>
  
  <tr>
    <td>
      <code>
        auth.email_change_notice_unsent
      </code>
    </td>
    
    <td>
      warn
    </td>
    
    <td>
      The notice telling the old address of an email change was not sent: the email instance threw (test mode refusing that address, an override with no body, a provider error). The change went through.
    </td>
    
    <td>
      Fix the cause in the error after the line; the notice is not retried.
    </td>
  </tr>
  
  <tr>
    <td>
      <code>
        auth.recovery_notice_unsent
      </code>
    </td>
    
    <td>
      warn
    </td>
    
    <td>
      A passkey-only account signed in with its recovery code, and the email telling it so was not sent: the email instance threw. The recovery went through.
    </td>
    
    <td>
      Fix the cause in the error after the line; the notice is not retried.
    </td>
  </tr>
  
  <tr>
    <td>
      <code>
        auth.passkey_only_notice_unsent
      </code>
    </td>
    
    <td>
      warn
    </td>
    
    <td>
      A sign-in code was asked for a passkey-only account, and the email saying it signs in with a passkey was not sent: the email instance threw. No code was sent either way.
    </td>
    
    <td>
      Fix the cause in the error after the line.
    </td>
  </tr>
  
  <tr>
    <td>
      <code>
        auth.welcome_unsent
      </code>
    </td>
    
    <td>
      warn
    </td>
    
    <td>
      A new account's welcome email was not sent: the email instance threw (test mode refusing a real address, an override with no body, a provider error). The account exists and <code>
        onUserCreated
      </code>
      
       ran.
    </td>
    
    <td>
      Fix the cause in the error after the line; the welcome is not retried.
    </td>
  </tr>
  
  <tr>
    <td>
      <code>
        access.invitation_unsent
      </code>
    </td>
    
    <td>
      warn
    </td>
    
    <td>
      An invitation by address was made with "Email them", but its email was not sent: the provider refused it, or the deployment is in test mode and the address is no test address. The invitation stands.
    </td>
    
    <td>
      Read the error after the line. The person can still sign up with the address; tell them another way, or invite them again later.
    </td>
  </tr>
  
  <tr>
    <td>
      <code>
        access.ticket_unrecorded
      </code>
    </td>
    
    <td>
      warn
    </td>
    
    <td>
      A new account signed up with a ticket while the app was closed, and the ticket was not recorded against it: the redemption ledger row was not named after the account, or <code>
        access.ticket_used
      </code>
      
       did not reach the activity trail. The account exists and the ticket was used.
    </td>
    
    <td>
      Fix the cause in the error after the line; the Users tab shows no ticket for that account.
    </td>
  </tr>
  
  <tr>
    <td>
      <code>
        access.referral_unclaimed
      </code>
    </td>
    
    <td>
      warn
    </td>
    
    <td>
      A friend a <a href="https://nuxt-backend.dev/docs/build/growth/launch/invites#let-members-bring-friends">
        member's ticket
      </a>
      
       admitted may not count as the member's referral (<code>
        memberTickets({ referrals })
      </code>
      
      ): the referral program threw while the account was made, before its claim or while recording the claim on the member's activity. The account exists. A claim the program refuses (<code>
        already_claimed
      </code>
      
      , <code>
        self_referral
      </code>
      
      ) logs nothing.
    </td>
    
    <td>
      Read the error after the line. The member's referrals (<code>
        useReferrals()
      </code>
      
      ) show whether the friend counted; if not, the friend can still claim the member's referral link (<code>
        /r/<code>
      </code>
      
      ) within a day of signing up.
    </td>
  </tr>
  
  <tr>
    <td>
      <code>
        waitlist.mirror_drift
      </code>
    </td>
    
    <td>
      warn
    </td>
    
    <td>
      A launch-news contact could not be written to the email provider after its retries (a provider outage, a refused key, a rate limit). Its <a href="https://nuxt-backend.dev/docs/build/growth/launch/waitlist#launch-news-for-those-who-ask">
        waitlist
      </a>
      
       entry is flagged <code>
        drift
      </code>
      
       and the entry itself is safe.
    </td>
    
    <td>
      Read the error after the line. The next maintenance pass, an hour later, writes the contact again; the Waitlist tab counts the drifted ones.
    </td>
  </tr>
  
  <tr>
    <td>
      <code>
        waitlist.admitted_unsent
      </code>
    </td>
    
    <td>
      warn
    </td>
    
    <td>
      A waitlist entry was admitted from the Waitlist tab, but its "You're in" email was not sent: the email instance threw (test mode refusing that address, an override with no body, a provider error). The ticket stands.
    </td>
    
    <td>
      Fix the cause in the error after the line and write to the person; the email is not retried.
    </td>
  </tr>
  
  <tr>
    <td>
      <code>
        waitlist.confirmation_unsent
      </code>
    </td>
    
    <td>
      warn
    </td>
    
    <td>
      A new waitlist entry was recorded, but its confirmation email with the status link was not sent (the email instance threw, or <code>
        SITE_URL
      </code>
      
       is not set), or its <code>
        waitlist.joined
      </code>
      
       event did not reach the activity trail. The entry and its place stand.
    </td>
    
    <td>
      Fix the cause in the error after the line. The person sees their place on the sign-in page; the status link is not resent.
    </td>
  </tr>
  
  <tr>
    <td>
      <code>
        waitlist.friend_unsent
      </code>
    </td>
    
    <td>
      warn
    </td>
    
    <td>
      "A friend joined through a waitlist link, but the sharer was not emailed; the credit stands." A friend joined through a waiting person's share link, but the "A friend joined" email to that person was not sent (the email instance threw, or <code>
        SITE_URL
      </code>
      
       is not set). Only with <code>
        setupAccess({ waitlist: { boost: { notify: true } } })
      </code>
      
      . The friend's credit stands.
    </td>
    
    <td>
      Fix the cause in the error after the line. The person sees their credit on their status page; the email for that day is not resent.
    </td>
  </tr>
  
  <tr>
    <td>
      <code>
        consent.signup_unrecorded
      </code>
    </td>
    
    <td>
      error
    </td>
    
    <td>
      A new account was created, but what it agreed to at sign-up (the required <a href="https://nuxt-backend.dev/docs/build/auth/accounts/consents">
        consents
      </a>
      
      , the age check) was not written to the ledger, or the consents its address gave before were not carried over. The account stands.
    </td>
    
    <td>
      Read the error after the line. The person is asked again for the missing consents on their next page (<code>
        <ConsentPrompt>
      </code>
      
      ), so nothing is lost; fix the cause and no later sign-up is affected.
    </td>
  </tr>
  
  <tr>
    <td>
      <code>
        consent.event_unrecorded
      </code>
    </td>
    
    <td>
      warn
    </td>
    
    <td>
      A consent decision was written to the ledger, but its <code>
        consent.granted
      </code>
      
       or <code>
        consent.withdrawn
      </code>
      
       event did not reach the <a href="https://nuxt-backend.dev/docs/build/auth/admin/audit-log">
        activity trail
      </a>
      
      . The decision stands.
    </td>
    
    <td>
      Fix the cause in the error after the line. The ledger, not the trail, is the record of a consent.
    </td>
  </tr>
  
  <tr>
    <td>
      <code>
        consent.under_age_cookie_unset
      </code>
    </td>
    
    <td>
      warn
    </td>
    
    <td>
      An age under <code>
        minimumAge
      </code>
      
       was refused, but the response could not carry the cookie that keeps this browser refused for a day. The refusal stands; a second answer from the same browser is not refused at once.
    </td>
    
    <td>
      Read the error after the line.
    </td>
  </tr>
  
  <tr>
    <td>
      <code>
        waitlist.caps_unread
      </code>
    </td>
    
    <td>
      warn
    </td>
    
    <td>
      The Waitlist tab could not read the sign-in code budget or the email provider's usage, and shows the one it could not read as not known.
    </td>
    
    <td>
      Read the error after the line. A key restricted to sending cannot read usage: give the deployment a full-access key, or ignore it.
    </td>
  </tr>
  
  <tr>
    <td>
      <code>
        email.inbound_rejected
      </code>
    </td>
    
    <td>
      warn
    </td>
    
    <td>
      Mail sent to your app was dropped before any hook of yours saw it. The line's <code>
        reason
      </code>
      
       says why: <code>
        dmarc
      </code>
      
       (the sender failed DMARC, or a reply came from a sender that did not pass it), <code>
        rate_limited
      </code>
      
       (the sender is past the inbound rate limit), <code>
        sender_mismatch
      </code>
      
       (a reply address was answered by someone other than the person it was made for) or <code>
        unknown_recipient
      </code>
      
       (no reply address, workspace or support address claims the address). The line never names the sender, the subject or the text.
    </td>
    
    <td>
      Nothing to fix for a forgery or a flood. For a legitimate sender: <code>
        dmarc
      </code>
      
       means their domain's SPF and DKIM do not line up, and <code>
        unknown_recipient
      </code>
      
       that the address is nobody's (a workspace's slug changed, or a reply address was never made). See <a href="https://nuxt-backend.dev/docs/build/email/inbound#what-happens-when">
        Receive email
      </a>
      
      .
    </td>
  </tr>
  
  <tr>
    <td>
      <code>
        email.contact_held
      </code>
    </td>
    
    <td>
      warn
    </td>
    
    <td>
      A contact message was stored and its copy for your team was not sent: the deployment has no <code>
        EMAIL_API_KEY
      </code>
      
      , or it is in test mode and the address is not one of the provider's test addresses, or <code>
        contact.to
      </code>
      
       is a test address on a sandbox or a preview that publishes its dev inbox, where anyone could read the copy. The message waits in the admin console's Inbox tab.
    </td>
    
    <td>
      Set <code>
        EMAIL_API_KEY
      </code>
      
      , and on production <code>
        BACKEND_ENVIRONMENT=production
      </code>
      
      . On a <code>
        development
      </code>
      
       deployment, the copy for <code>
        contact.to
      </code>
      
       goes to <code>
        delivered@resend.dev
      </code>
      
       by itself, unless a support inbox, which wins, is set; a sandbox or a preview holds it back on purpose. Give <code>
        contact.to
      </code>
      
       a real address. See <a href="https://nuxt-backend.dev/docs/build/email/inbound/contact-form#test-it">
        Add a contact form
      </a>
      
      .
    </td>
  </tr>
  
  <tr>
    <td>
      <code>
        email.contact_failed
      </code>
    </td>
    
    <td>
      error
    </td>
    
    <td>
      A contact message was stored, and the email provider refused to queue its copy for your team. The row in the Inbox tab shows it as failed, with the provider's words.
    </td>
    
    <td>
      Read the error after the line: usually an unverified sender domain, or a key that cannot send. The message is not lost; answer it from the Inbox tab's address.
    </td>
  </tr>
  
  <tr>
    <td>
      <code>
        email.inbox_unread
      </code>
    </td>
    
    <td>
      warn
    </td>
    
    <td>
      A received email, or a support inbox email, could not be read from the email provider because it is already gone. The message was dropped; nothing else is affected.
    </td>
    
    <td>
      None, unless it repeats: then check that <code>
        EMAIL_API_KEY
      </code>
      
       can read received mail (a full-access key, not one restricted to sending).
    </td>
  </tr>
  
  <tr>
    <td>
      <code>
        email.suppression_refused
      </code>
    </td>
    
    <td>
      warn
    </td>
    
    <td>
      The email provider refused to lift a suppression from the admin console's Suppressions tab. The line carries the provider's words.
    </td>
    
    <td>
      Give the deployment a full-access <code>
        EMAIL_API_KEY
      </code>
      
      : a key restricted to sending cannot call the suppressions API (<a href="https://nuxt-backend.dev/docs/build/email/delivery/suppressions#limits">
        Handle suppressed addresses
      </a>
      
      ).
    </td>
  </tr>
  
  <tr>
    <td>
      <code>
        webhook.replay_refused
      </code>
    </td>
    
    <td>
      warn
    </td>
    
    <td>
      A provider refused to send a webhook delivery again from the Webhooks tab or DevTools. The line carries the provider's words.
    </td>
    
    <td>
      Check the provider key's scopes (Polar's <code>
        webhooks:write
      </code>
      
      , a full-access Resend key) and that this deployment's <code>
        /email/events
      </code>
      
       has a webhook at Resend (<a href="https://nuxt-backend.dev/docs/ship/operate/replay#limits">
        Replay a webhook delivery
      </a>
      
      ).
    </td>
  </tr>
  
  <tr>
    <td>
      <code>
        auth.new_device_unrecorded
      </code>
    </td>
    
    <td>
      warn
    </td>
    
    <td>
      A sign-in's device could not be checked against the account's known devices; the sign-in went through, and no new-device alert was recorded for it.
    </td>
    
    <td>
      Nothing to do for that sign-in. If it repeats, check the deployment's logs for the backend component's error.
    </td>
  </tr>
  
  <tr>
    <td>
      <code>
        auth.new_device_choice_unread
      </code>
    </td>
    
    <td>
      warn
    </td>
    
    <td>
      Whether a person turned the new-device email off in their notification preferences could not be read, so the email went out anyway: an alert someone did not want beats one lost. The sign-in went through.
    </td>
    
    <td>
      Nothing to do for that sign-in. If it repeats, check the deployment's logs for the backend component's error.
    </td>
  </tr>
  
  <tr>
    <td>
      <code>
        auth.new_device_unsent
      </code>
    </td>
    
    <td>
      warn
    </td>
    
    <td>
      A new-device alert email was not sent; the sign-in went through, and the alert is in the app and on the activity trail.
    </td>
    
    <td>
      Check the email setup, as for any send (<a href="https://nuxt-backend.dev/docs/build/email/delivery/deliverability">
        Get email into inboxes
      </a>
      
      ).
    </td>
  </tr>
  
  <tr>
    <td>
      <code>
        email.undeliverable
      </code>
    </td>
    
    <td>
      warn
    </td>
    
    <td>
      A one-time code (to sign in, or for an email change), an invitation or a gift checkout was refused on the request, because its email would not arrive; or a paid gift's email to its recipient was skipped for the same reason (the gift stands, and the recipient can claim it in the app). The line names the setting: <code>
        EMAIL_API_KEY
      </code>
      
      , <code>
        BACKEND_ENVIRONMENT
      </code>
      
       or <code>
        EMAIL_FROM
      </code>
      
      .
    </td>
    
    <td>
      Change that setting, as <a href="https://nuxt-backend.dev/docs/build/email/delivery/deliverability">
        Get email into inboxes
      </a>
      
       shows. For a skipped gift email, then redeliver that <code>
        order.paid
      </code>
      
       event from the billing provider's webhook dashboard: nothing retries it on its own.
    </td>
  </tr>
  
  <tr>
    <td>
      <code>
        email.locale_unread
      </code>
    </td>
    
    <td>
      warn
    </td>
    
    <td>
      The language of an email's recipient account, or of the account it was sent on behalf of (<code>
        sendTemplate
      </code>
      
      's <code>
        senderId
      </code>
      
      : an inviter, a gift's purchaser), could not be read, so the email went in the next language the order knows, <code>
        defaultLocale
      </code>
      
       at last. The email itself was sent.
    </td>
    
    <td>
      Read the error after the line. A <code>
        senderId
      </code>
      
       must be the id of a Better Auth account (<code>
        user.id
      </code>
      
      ), not a row of your own tables.
    </td>
  </tr>
  
  <tr>
    <td>
      <code>
        email.secret_failed
      </code>
    </td>
    
    <td>
      warn
    </td>
    
    <td>
      A sign-in code or verification code email was not delivered: the provider refused it, it kept failing until its code expired, or it was never sent. The line gives the reason in the package's words, never the address or the provider's. Such an email leaves no record to read.
    </td>
    
    <td>
      A refusal usually means test mode and a real address, or a sender domain the provider has not verified; <a href="https://nuxt-backend.dev/docs/build/email/delivery/deliverability">
        Get email into inboxes
      </a>
      
       covers both. Repeated failures with <code>
        429
      </code>
      
       mean the provider's rate limit.
    </td>
  </tr>
  
  <tr>
    <td>
      <code>
        maintenance.task_failed
      </code>
    </td>
    
    <td>
      error
    </td>
    
    <td>
      A task of the backend component's <a href="https://nuxt-backend.dev/docs/build/data/jobs/scheduled#the-maintenance-the-component-runs">
        maintenance
      </a>
      
       threw, or could not delete one row. A row is skipped; a task that throws ends its pass, and the next pass, an hour later, tries again. DevTools shows the error beside the task.
    </td>
    
    <td>
      Read the error that follows the line. A task that fails every hour is a bug: report it with the line.
    </td>
  </tr>
  
  <tr>
    <td>
      <code>
        retention.batch_failed
      </code>
    </td>
    
    <td>
      error
    </td>
    
    <td>
      A <a href="https://nuxt-backend.dev/docs/build/data/retention">
        <code>
          defineRetention
        </code>
      </a>
      
       batch threw, in the rule's <code>
        onDelete
      </code>
      
       or the delete, and rolled back. The line names the rule's function, the table and the row's id; the pass ends. The next pass retries from the same oldest rows, so a row that keeps failing holds its rule up.
    </td>
    
    <td>
      Read the error that follows the line. Fix what the row's <code>
        onDelete
      </code>
      
       needs (a file it releases, a count it updates) or the row, and run the rule once by hand: <code>
        npx convex run retention:pruneDrafts
      </code>
      
      .
    </td>
  </tr>
  
  <tr>
    <td>
      <code>
        webhook.secret_missing
      </code>
    </td>
    
    <td>
      warn
    </td>
    
    <td>
      A webhook route is mounted without its secret, so every delivery is refused with <code>
        503
      </code>
      
      .
    </td>
    
    <td>
      Set <code>
        BILLING_WEBHOOK_SECRET
      </code>
      
       or <code>
        EMAIL_WEBHOOK_SECRET
      </code>
      
      ; <code>
        doctor
      </code>
      
       names the route.
    </td>
  </tr>
  
  <tr>
    <td>
      <code>
        webhook.log_write_failed
      </code>
    </td>
    
    <td>
      error
    </td>
    
    <td>
      A delivery was handled, but its row in the delivery log was not written.
    </td>
    
    <td>
      The event itself was processed. Check the error that follows the line.
    </td>
  </tr>
  
  <tr>
    <td>
      <code>
        webhook.rejected
      </code>
    </td>
    
    <td>
      warn
    </td>
    
    <td>
      <code>
        /billing/events
      </code>
      
       or <code>
        /email/events
      </code>
      
       refused a delivery before running anything. The line names the route, the outcome and the status: <code>
        oversized
      </code>
      
       (413), <code>
        invalid_signature
      </code>
      
       (403), or <code>
        missing_secret
      </code>
      
       (503) when the backend component has no <code>
        EMAIL_WEBHOOK_SECRET
      </code>
      
       of its own. It is written once per isolate for each route and outcome; the delivery log counts every refusal.
    </td>
    
    <td>
      For <code>
        invalid_signature
      </code>
      
      , check that <code>
        BILLING_WEBHOOK_SECRET
      </code>
      
       or <code>
        EMAIL_WEBHOOK_SECRET
      </code>
      
       holds the endpoint's current secret (a comma-separated list during a rotation). For <code>
        missing_secret
      </code>
      
      , keep the line that forwards <code>
        EMAIL_WEBHOOK_SECRET
      </code>
      
       to the component in <code>
        convex.config.ts
      </code>
      
      . A steady trickle from unknown senders needs nothing.
    </td>
  </tr>
  
  <tr>
    <td>
      <code>
        protection.refused
      </code>
    </td>
    
    <td>
      warn
    </td>
    
    <td>
      A sign-in code request, a sign-up or a <code>
        verifyHuman
      </code>
      
       call behind the bot check carried no proof or challenge answer that passed, and was refused as <code>
        forbidden
      </code>
      
       (<code>
        bot_check
      </code>
      
      ). The line says why: the proof is <code>
        missing
      </code>
      
      , <code>
        expired
      </code>
      
      , or signed for something else (<code>
        mismatch
      </code>
      
      : another secret, route, address or deployment), or the challenge answer was refused.
    </td>
    
    <td>
      One now and then is a bot, or someone calling the deployment's own URL: nothing to do. Every request refused with <code>
        mismatch
      </code>
      
       means the app's server and the deployment hold different <code>
        PROTECTION_PROOF_SECRET
      </code>
      
       values, or the app forwards to a site URL that is not the deployment's own <code>
        CONVEX_SITE_URL
      </code>
      
      : <code>
        npx nuxt-backend doctor --only protection
      </code>
      
       checks both. Every request refused with <code>
        missing
      </code>
      
       off Vercel means nothing signs proofs there: use the challenge keys. A challenge answer reaching a query or mutation needs an action.
    </td>
  </tr>
  
  <tr>
    <td>
      <code>
        protection.challenge_unavailable
      </code>
    </td>
    
    <td>
      warn
    </td>
    
    <td>
      The challenge provider could not be reached to verify an answer, so the request was refused as <code>
        unavailable
      </code>
      
       (<code>
        protection
      </code>
      
      , <code>
        provider_refused
      </code>
      
      ).
    </td>
    
    <td>
      Usually brief: the provider's status page says. Persistent lines from one deployment point at its outbound network.
    </td>
  </tr>
  
  <tr>
    <td>
      <code>
        billing.provider_failed
      </code>
    </td>
    
    <td>
      error
    </td>
    
    <td>
      The billing provider refused a request; the caller saw <code>
        unavailable
      </code>
      
       with reason <code>
        provider_refused
      </code>
      
      , never the provider's own words.
    </td>
    
    <td>
      Read the provider's error that follows the line: a token scope, a product id or the provider's status.
    </td>
  </tr>
  
  <tr>
    <td>
      <code>
        billing.commerce_unknown_entity
      </code>
    </td>
    
    <td>
      warn
    </td>
    
    <td>
      On Stripe, Dodo or Creem, a subscription or order delivery named no billing entity the app knows: no <code>
        entity_id
      </code>
      
       in its metadata, no customer the app linked, and no subscription it holds. It was acknowledged and changed nothing: an order named this way is not recorded and its credits are not granted, and no later delivery applies it.
    </td>
    
    <td>
      A checkout opened outside the app (a payment link, the dashboard) carries no entity. Sell through <code>
        useBilling().checkout
      </code>
      
      , or link the customer by opening a checkout for that entity once; that covers later deliveries only. The package has no call that applies the order already paid: refund it at the provider and have the buyer check out again through the app.
    </td>
  </tr>
  
  <tr>
    <td>
      <code>
        billing.revenue_metrics_missing
      </code>
    </td>
    
    <td>
      warn
    </td>
    
    <td>
      The billing provider failed on its side (a 5xx) for some revenue metrics or a meter's usage: the admin Revenue view shows the others, and those empty.
    </td>
    
    <td>
      Nothing to fix on your side; the line names the metrics. If they stay missing, report them to the provider with the window and interval.
    </td>
  </tr>
  
  <tr>
    <td>
      <code>
        billing.trusted_origin_invalid
      </code>
    </td>
    
    <td>
      warn
    </td>
    
    <td>
      When billing is set up: a <code>
        setupBilling({ trustedOrigins })
      </code>
      
       entry has no scheme or is no URL (<code>
        app.example.com
      </code>
      
      ), so it trusts nothing and a checkout back to it is refused.
    </td>
    
    <td>
      Write it as an origin with its scheme: <code>
        https://app.example.com
      </code>
      
      .
    </td>
  </tr>
  
  <tr>
    <td>
      <code>
        billing.checkout_discount_dropped
      </code>
    </td>
    
    <td>
      warn
    </td>
    
    <td>
      The provider no longer redeems the discount <code>
        setupBilling({ checkoutDiscount })
      </code>
      
       picked for a checkout (it ended, is used up, or the customer redeemed it as often as it allows), so the checkout opened again without it, at the regular price. The line names the discount's key.
    </td>
    
    <td>
      Nothing for one customer now and then. On every checkout, the promotion is over: stop picking it in <code>
        checkoutDiscount
      </code>
      
      , or retire it in <code>
        billing.catalog.ts
      </code>
      
       and run <code>
        npx nuxt-backend billing sync
      </code>
      
      .
    </td>
  </tr>
  
  <tr>
    <td>
      <code>
        billing.subscription_change_unrecorded
      </code>
    </td>
    
    <td>
      warn
    </td>
    
    <td>
      A plan change, a pause or another lifecycle call went through at the provider, but the scheduled plan change or resume date it returned could not be kept, so <code>
        useBilling().pendingChange
      </code>
      
       or <code>
        resumesAt
      </code>
      
       lags until the next <code>
        subscription.*
      </code>
      
       webhook. The call itself succeeded.
    </td>
    
    <td>
      Read the error that follows the line. Check that <code>
        BILLING_WEBHOOK_SECRET
      </code>
      
       is set, so the webhook brings the state in.
    </td>
  </tr>
  
  <tr>
    <td>
      <code>
        billing.product_resync_failed
      </code>
    </td>
    
    <td>
      warn
    </td>
    
    <td>
      A <code>
        benefit.updated
      </code>
      
       delivery was handled, but re-syncing the products table after it failed (Polar did not answer), so <code>
        getPricing
      </code>
      
       and <code>
        /pricing
      </code>
      
       keep the benefit's old figures. The delivery was not failed, and the app's own <code>
        benefit.updated
      </code>
      
       hook ran.
    </td>
    
    <td>
      Read the error that follows the line. Run <code>
        npx convex run billing:syncProducts
      </code>
      
       once the provider answers; the next product event also catches up.
    </td>
  </tr>
  
  <tr>
    <td>
      <code>
        billing.gift_unverified
      </code>
    </td>
    
    <td>
      warn
    </td>
    
    <td>
      A paid order named a gift in its metadata but was not that gift's purchase (another product, customer, a discount or no charge) or claim (another discount or workspace). The gift was left as it was.
    </td>
    
    <td>
      Look the order up in the provider's dashboard. A purchase order that should have delivered the gift points at a gift product <code>
        billing sync
      </code>
      
       did not create; refund it and have the purchaser send the gift again.
    </td>
  </tr>
  
  <tr>
    <td>
      <code>
        billing.gift_claim_not_free
      </code>
    </td>
    
    <td>
      error
    </td>
    
    <td>
      A gift's claim checkout came back with a price, so the package did not confirm it and the recipient saw <code>
        unavailable
      </code>
      
      .
    </td>
    
    <td>
      Check the gift's discount in the provider's dashboard: it must be 100% on the pack, unexpired and unredeemed.
    </td>
  </tr>
  
  <tr>
    <td>
      <code>
        billing.gift_claim_hosted
      </code>
    </td>
    
    <td>
      warn
    </td>
    
    <td>
      A gift claim opened the provider's $0 checkout instead of confirming on the server, because the pack asks for checkout fields.
    </td>
    
    <td>
      Nothing: the recipient finishes it there. Drop the pack's required custom fields for one-click claims.
    </td>
  </tr>
  
  <tr>
    <td>
      <code>
        billing.gift_refunded_after_claim
      </code>
    </td>
    
    <td>
      warn
    </td>
    
    <td>
      A gift's purchase was refunded, or <code>
        refundOrder
      </code>
      
       was about to refund it, after its recipient claimed it or while the claim was under way (its discount was redeemed). The credits stay with them: the provider can't take back a $0 order's benefits.
    </td>
    
    <td>
      Decide with the recipient; revoke credits by hand if you must.
    </td>
  </tr>
  
  <tr>
    <td>
      <code>
        billing.gift_claimed_after_refund
      </code>
    </td>
    
    <td>
      error
    </td>
    
    <td>
      A gift's claim order was paid after its purchase was refunded and voided: the recipient holds credits nobody paid for.
    </td>
    
    <td>
      Look at the two orders in the provider's dashboard; revoke the credits by hand or let them stand.
    </td>
  </tr>
  
  <tr>
    <td>
      <code>
        billing.gift_settle_failed
      </code>
    </td>
    
    <td>
      warn
    </td>
    
    <td>
      A purchaser came back from a gift checkout, but the order could not be read from the provider, so the return did not settle the gift.
    </td>
    
    <td>
      Nothing on a deployment that gets webhooks: <code>
        order.paid
      </code>
      
       settles it. On a local one, check the provider answers (<code>
        BILLING_ACCESS_TOKEN
      </code>
      
      ), then come back to the page with the address the checkout returned to.
    </td>
  </tr>
  
  <tr>
    <td>
      <code>
        billing.gift_over_limit
      </code>
    </td>
    
    <td>
      error
    </td>
    
    <td>
      A gift was paid past its purchaser's gift limit (several checkouts opened at once, all paid), so the package refunded it in full instead of delivering it.
    </td>
    
    <td>
      Nothing, unless the limit is too low for your app: raise <code>
        setupBilling({ giftLimit })
      </code>
      
      .
    </td>
  </tr>
  
  <tr>
    <td>
      <code>
        billing.gift_over_address_limit
      </code>
    </td>
    
    <td>
      error
    </td>
    
    <td>
      A gift was paid past its recipient address's limit of 5 gifts a day, so the package refunded it in full instead of delivering it.
    </td>
    
    <td>
      Nothing: the purchaser was refunded.
    </td>
  </tr>
  
  <tr>
    <td>
      <code>
        billing.gift_refund_failed
      </code>
    </td>
    
    <td>
      error
    </td>
    
    <td>
      A gift's refund failed at the provider (Stripe, Dodo). A gift over its limit stays void; a gift whose refund failed later stays as the refund left it. Its message says which case: "A gift over its limit was voided, but the refund of its purchase failed or went unanswered: check the payment in the provider dashboard, and refund it there if no refund went through." means the provider refused the refund outright, or its answer was lost. "A refund of gift order <code>
        <orderId>
      </code>
      
       failed at the provider, so its purchaser was not refunded and the gift stays as it is: refund the purchase outside the provider." means the provider accepted it and failed it later (Stripe's card refund the customer's bank returned): a gift its sender cancelled stays cancelled, as they asked, and is never sent to its recipient again.
    </td>
    
    <td>
      Over a limit: look at the payment in the provider's dashboard first, as a refund may have gone through unanswered, and refund it there if none did (Dodo pays refunds from your wallet, so check its balance as well). Failed later: check the gift's status once any cancellation of it has finished, as one still under way can yet mark it cancelled and one whose answer was lost leaves it open: a gift still open or claimed was not cancelled, and nothing is owed for it. Otherwise Stripe takes no new refund of that charge, so pay the purchaser outside Stripe (a bank transfer, say).
    </td>
  </tr>
  
  <tr>
    <td>
      <code>
        billing.refund_failed
      </code>
    </td>
    
    <td>
      error
    </td>
    
    <td>
      On Stripe or Dodo, a refund of an order failed after the provider accepted it, as Stripe does when the customer's bank returns a card refund: "A refund of order <code>
        <orderId>
      </code>
      
       failed at <code>
        <provider>
      </code>
      
       after it went through (the customer's bank returned it): the order counts as paid again, and <code>
        <n>
      </code>
      
       credits taken back when it was refunded in full are spendable again. Refund the customer outside <code>
        <provider>
      </code>
      
       if you still mean to." The money is back in your provider balance. An order another refund of which stands counts as "partly refunded again". The credits part follows what the order's refunds came to before this one failed, not this refund's own amount: "<code>
        <n>
      </code>
      
       credits taken back when it was refunded in full are spendable again" for an order refunded in full, by this refund alone or with others; "no credits came back: refunded in full, it had none taken back, or they have lapsed since, as a later period or the subscription's end lapses them" for one refunded in full whose credits a later period, or the subscription's end or past due, lapsed while the refund was out; "it kept its credits, as an order refunded only in part does" for one refunded only in part, which took none.
    </td>
    
    <td>
      Stripe takes no new refund of that charge (it refuses one as <code>
        refund_refused
      </code>
      
      , <code>
        refund_failed_before
      </code>
      
       in the log): if the customer is still owed the money, pay it outside Stripe (a bank transfer, say). Once what you paid outside and the refunds that stand make up the whole order, take back what a refund in full would. The ledger counts spends against the meter, not against an order, so a refund in full takes up to what the order granted out of the meter's balance and what spends in flight hold: here the smaller of the log's <code>
        <n>
      </code>
      
       (how many came back with this failure) and the balance now, which <code>
        billing.getCustomerState
      </code>
      
       with <code>
        userId
      </code>
      
       lists per meter, read while no spend is in flight. Leave out a plan period's credits that lapsed since: a plan's credits lapse as its period ends unless its <code>
        credits.rollover
      </code>
      
       is set. Take that count with <code>
        billing.spendCredits
      </code>
      
       from a server action, passing the entity as <code>
        userId
      </code>
      
      , the meter as <code>
        meter
      </code>
      
       and the count as <code>
        value
      </code>
      
      , which is 1 when left out. A meter with no <code>
        property
      </code>
      
       counts events and takes a <code>
        value
      </code>
      
       of 1 only: there, make one spend per credit, each with its own <code>
        externalId
      </code>
      
      . Where you can't tell that count (the log is gone, or one failure brought back several orders' credits), take none: a debit you can't check against the log takes credits the customer paid for elsewhere. While they come to less, the order keeps its credits, as a partially refunded one does.
    </td>
  </tr>
  
  <tr>
    <td>
      <code>
        billing.gift_sweep_unregistered
      </code>
    </td>
    
    <td>
      warn
    </td>
    
    <td>
      The gift sweep could not be registered with the component, so a gift dated for later is delivered by its scheduled function only.
    </td>
    
    <td>
      Check that <code>
        backend/billing.ts
      </code>
      
       exports <code>
        runGiftSweep
      </code>
      
       (<code>
        npx nuxt-backend upgrade
      </code>
      
       restores it); the next paid gift registers it again.
    </td>
  </tr>
  
  <tr>
    <td>
      <code>
        billing.gift_sweep_task_failed
      </code>
    </td>
    
    <td>
      error
    </td>
    
    <td>
      One step of the gift sweep (a delivery, the one reminder, or a plan pass step) failed.
    </td>
    
    <td>
      Nothing at once: the next sweep, in an hour, tries it again. A step that keeps failing names its cause in the line before it.
    </td>
  </tr>
  
  <tr>
    <td>
      <code>
        referrals.sweep_unregistered
      </code>
    </td>
    
    <td>
      warn
    </td>
    
    <td>
      The referral sweep could not be registered with the component, so no reward is granted when a hold ends.
    </td>
    
    <td>
      Check that <code>
        backend/referrals.ts
      </code>
      
       exports <code>
        runReferralSweep
      </code>
      
       (<code>
        export const { …, runReferralSweep } = referrals.api
      </code>
      
      ); the next claim registers it again.
    </td>
  </tr>
  
  <tr>
    <td>
      <code>
        referrals.reward_unavailable
      </code>
    </td>
    
    <td>
      warn
    </td>
    
    <td>
      The referral program names a reward the catalog cannot back: a discount it does not have or that needs a typed code, or a pack it does not sell. That side gets no reward until the catalog does.
    </td>
    
    <td>
      Declare the discount without a <code>
        code
      </code>
      
       (or the pack) in <code>
        billing.catalog.ts
      </code>
      
       and run <code>
        npx nuxt-backend billing sync
      </code>
      
      . Referrals claimed meanwhile keep the terms they were claimed under.
    </td>
  </tr>
  
  <tr>
    <td>
      <code>
        referrals.reward_failed
      </code>
    </td>
    
    <td>
      error
    </td>
    
    <td>
      A referrer's reward could not be granted: its checkout was not free, or the pack asks for checkout fields a reward cannot fill in. The error follows the line.
    </td>
    
    <td>
      Pick a pack that asks for no checkout fields. The sweep, hourly, tries the reward again with the same slot under the caps.
    </td>
  </tr>
  
  <tr>
    <td>
      <code>
        referrals.sweep_task_failed
      </code>
    </td>
    
    <td>
      error
    </td>
    
    <td>
      One reward of the referral sweep failed.
    </td>
    
    <td>
      Nothing at once: the next sweep tries it again. A reward that keeps failing names its cause in the line before it.
    </td>
  </tr>
  
  <tr>
    <td>
      <code>
        billing.referral_step_failed
      </code>
    </td>
    
    <td>
      error
    </td>
    
    <td>
      The referral program could not act on an order delivery (start a hold, or void a referral). The delivery itself was accepted.
    </td>
    
    <td>
      The sweep reads the order again at the end of the hold. If it keeps failing, read the error that follows the line.
    </td>
  </tr>
  
  <tr>
    <td>
      <code>
        billing.pass_period_unaligned
      </code>
    </td>
    
    <td>
      warn
    </td>
    
    <td>
      A claimed plan pass kept the provider's billing period instead of starting its first month at the claim.
    </td>
    
    <td>
      Nothing: the pass's end date still holds, enforced by the sweep.
    </td>
  </tr>
  
  <tr>
    <td>
      <code>
        billing.lifecycle_step_failed
      </code>
    </td>
    
    <td>
      error
    </td>
    
    <td>
      The billing lifecycle could not act on a webhook delivery: a checkout's renewal consent proof was not confirmed, an annual renewal reminder was not sent, or an abandoned checkout was not recorded. The delivery itself was accepted.
    </td>
    
    <td>
      Read the error that follows the line. A missed reminder goes out at the next renewal that is due.
    </td>
  </tr>
  
  <tr>
    <td>
      <code>
        billing.withdrawal_receipt_failed
      </code>
    </td>
    
    <td>
      error
    </td>
    
    <td>
      An EU withdrawal went through at the provider, but its receipt email could not be sent.
    </td>
    
    <td>
      Check the email setup (<code>
        npx nuxt-backend doctor
      </code>
      
      ), then send the person their receipt by hand: the <code>
        billing.contract_withdrawn
      </code>
      
       row on the activity trail holds its date and time.
    </td>
  </tr>
  
  <tr>
    <td>
      <code>
        billing.consent_unrecorded
      </code>
    </td>
    
    <td>
      error
    </td>
    
    <td>
      A renewing checkout was created, but the proof of its renewal consent could not be kept.
    </td>
    
    <td>
      Read the error that follows the line. The checkout itself is unaffected.
    </td>
  </tr>
  
  <tr>
    <td>
      <code>
        billing.reverse_trial_failed
      </code>
    </td>
    
    <td>
      error
    </td>
    
    <td>
      A new workspace stayed on the free plan: its reverse trial could not start.
    </td>
    
    <td>
      Read the error that follows the line, and check that <code>
        billing sync
      </code>
      
       created the plan's pass product.
    </td>
  </tr>
  
  <tr>
    <td>
      <code>
        billing.welcome_credits_unqueued
      </code>
    </td>
    
    <td>
      error
    </td>
    
    <td>
      A new billing entity started on the free plan, but its welcome credits (<code>
        credits: { once: true }
      </code>
      
      ) could not be queued: the workpool could not be written to. The error follows the line.
    </td>
    
    <td>
      Grant them once the deployment answers: <code>
        npx convex run billing:startFreePlan '{"entityId":"<entity id>","welcome":true}'
      </code>
      
      . The grant is keyed by the entity, so running it twice grants once.
    </td>
  </tr>
  
  <tr>
    <td>
      <code>
        billing.welcome_credits_unsynced
      </code>
    </td>
    
    <td>
      warn
    </td>
    
    <td>
      Welcome credits were granted at the provider, but the balance could not be read back into the cache.
    </td>
    
    <td>
      Nothing: the next billing sync (a webhook, or opening a billing view) shows them.
    </td>
  </tr>
  
  <tr>
    <td>
      <code>
        billing.pass_claim_unrecorded
      </code>
    </td>
    
    <td>
      error
    </td>
    
    <td>
      A plan pass's claim, reverse trial or reward did not finish, and its subscription could not be switched back: it is on the pass product with nothing following it.
    </td>
    
    <td>
      Switch the workspace's subscription back to the free plan in the provider's dashboard.
    </td>
  </tr>
  
  <tr>
    <td>
      <code>
        billing.free_plan_unqueued
      </code>
    </td>
    
    <td>
      warn
    </td>
    
    <td>
      A workspace a sign-in or a member made (an account, with <code>
        billTo: 'user'
      </code>
      
      ) could not be queued for the catalog's free plan: the workpool could not be written to. The workspace was created all the same, without the free plan. The error follows the line.
    </td>
    
    <td>
      Put it on the free plan once the deployment answers: <code>
        npx convex run billing:startFreePlan '{"entityId":"<workspace id>"}'
      </code>
      
      , or <code>
        '{}'
      </code>
      
       for every workspace (those on a plan are left alone).
    </td>
  </tr>
  
  <tr>
    <td>
      <code>
        billing.free_plan_customer_taken
      </code>
    </td>
    
    <td>
      warn
    </td>
    
    <td>
      With <code>
        billTo: 'user'
      </code>
      
      , an account was not put on the free plan: the provider keeps an individual customer's email unique, and another account's customer holds this one (an earlier account with the same email, say). The account was created; its start is not retried.
    </td>
    
    <td>
      Free the email at the provider (or move that customer), then <code>
        npx convex run billing:startFreePlan '{"entityId":"<user id>"}'
      </code>
      
      .
    </td>
  </tr>
  
  <tr>
    <td>
      <code>
        billing.resync_failed
      </code>
    </td>
    
    <td>
      warn
    </td>
    
    <td>
      <code>
        billing resync
      </code>
      
       gave up on one billing entity: the provider kept refusing its read, eight times for its rate limit or three for anything else. The line names its id; its entitlements stay as they were.
    </td>
    
    <td>
      Read it again alone: <code>
        npx nuxt-backend billing resync --entity <id>
      </code>
      
       (<code>
        --prod
      </code>
      
       for production). Many of them in one sweep means the app's own traffic and the sweep share a low rate limit: run it at a quiet hour.
    </td>
  </tr>
  
  <tr>
    <td>
      <code>
        billing.resync_done
      </code>
    </td>
    
    <td>
      info
    </td>
    
    <td>
      A <code>
        billing resync
      </code>
      
       sweep finished: how many billing entities it read again, left to an erasure, and gave up on, with the ids it gave up on (the first 50).
    </td>
    
    <td>
      Nothing, unless it gave up on some: read those again with <code>
        billing resync --entity
      </code>
      
      .
    </td>
  </tr>
  
  <tr>
    <td>
      <code>
        billing.customer_mapping_stale
      </code>
    </td>
    
    <td>
      error
    </td>
    
    <td>
      A billing entity is mapped onto a provider customer the provider does not know: <code>
        BILLING_ACCESS_TOKEN
      </code>
      
       names another organization than the one the deployment's billing data came from (a new sandbox, say). Its billing calls are refused as <code>
        unavailable
      </code>
      
       (reason <code>
        customer_unknown
      </code>
      
      ), and its free plan's start leaves it alone.
    </td>
    
    <td>
      On a dev deployment, run <code>
        npx nuxt-backend billing reset
      </code>
      
      : it syncs the catalog to the token's organization, clears the deployment's billing data (the billing provider component's <code>
        customers
      </code>
      
       and <code>
        subscriptions
      </code>
      
       and the <code>
        backend
      </code>
      
       component's <code>
        billingEntitlements
      </code>
      
       cache) and puts every billing entity back on the free plan. <code>
        npx nuxt-backend doctor
      </code>
      
       reports it first, as <code>
        billing-customer-mapping
      </code>
      
      . On production, point <code>
        BILLING_ACCESS_TOKEN
      </code>
      
       back at the organization the data came from.
    </td>
  </tr>
  
  <tr>
    <td>
      <code>
        billing.customer_mapping_shared
      </code>
    </td>
    
    <td>
      error
    </td>
    
    <td>
      A billing entity is mapped onto a provider customer that is keyed to another entity: two workspaces shared one customer before 0.2. Its checkouts are refused as <code>
        forbidden
      </code>
      
       (reason <code>
        customer_taken
      </code>
      
      ).
    </td>
    
    <td>
      On a dev deployment, run <code>
        npx nuxt-backend billing reset
      </code>
      
      , which clears the deployment's billing data and gives each entity a customer of its own, or start from a fresh provider organization.
    </td>
  </tr>
  
  <tr>
    <td>
      <code>
        ai.cost_over_reservation
      </code>
    </td>
    
    <td>
      warn, error
    </td>
    
    <td>
      A metered action cost more than the credits it reserved, or its finalized cost was not an amount (NaN, infinite, negative); the reservation was charged.
    </td>
    
    <td>
      Raise that action's estimate, or fix its <code>
        finalize
      </code>
      
      .
    </td>
  </tr>
  
  <tr>
    <td>
      <code>
        ai.cost_unreported
      </code>
    </td>
    
    <td>
      warn
    </td>
    
    <td>
      A model call reported no cost (a model object of your own, or a provider that reports none) and the action's <code>
        prices
      </code>
      
       has no entry for its model, so the run was charged the credits it reserved.
    </td>
    
    <td>
      Add the model to the cost's <code>
        prices
      </code>
      
      , or call it by its <code>
        provider/model
      </code>
      
       id so the gateway reports the cost.
    </td>
  </tr>
  
  <tr>
    <td>
      <code>
        ai.convex_gateway_unavailable
      </code>
    </td>
    
    <td>
      info
    </td>
    
    <td>
      The Convex AI Gateway cannot be used on this deployment: a free plan (<code>
        AiGatewayDisabled
      </code>
      
      ), an anonymous local deployment (<code>
        AiGatewayUnavailable
      </code>
      
      ), or no <code>
        @convex-dev/ai-sdk-provider
      </code>
      
       installed. Model ids went to the next route: the Vercel AI Gateway with <code>
        AI_GATEWAY_API_KEY
      </code>
      
      , or a refusal. Once per isolate.
    </td>
    
    <td>
      Nothing, when the next route is the one you want. Otherwise upgrade the Convex plan, install the provider, or log the local deployment in to a project (<code>
        npx convex login
      </code>
      
      ).
    </td>
  </tr>
  
  <tr>
    <td>
      <code>
        ai.region_mismatch
      </code>
    </td>
    
    <td>
      warn
    </td>
    
    <td>
      A call made under <code>
        setupAi({ inferenceRegion: 'eu' })
      </code>
      
       reported, in <code>
        providerMetadata.gateway.routing
      </code>
      
      , a provider endpoint outside the pinned region. The call answered and was charged.
    </td>
    
    <td>
      Check the call's own <code>
        providerOptions.gateway.inferenceRegion
      </code>
      
      : a <code>
        providers
      </code>
      
       override there wins over the pin. Otherwise report it to Vercel with the generation id.
    </td>
  </tr>
  
  <tr>
    <td>
      <code>
        ai.chat_reply_failed
      </code>
    </td>
    
    <td>
      warn
    </td>
    
    <td>
      A chat reply failed: the model refused it, or every model call it made failed. The reply reads <code>
        failed
      </code>
      
       in the thread, and its reservation was released. The model's error follows the line.
    </td>
    
    <td>
      Read the error: a model with no route, a spent gateway budget, or a provider outage. The person can send again.
    </td>
  </tr>
  
  <tr>
    <td>
      <code>
        ai.knowledge_embed_failed
      </code>
    </td>
    
    <td>
      warn
    </td>
    
    <td>
      A knowledge document could not be embedded: the embedding model refused it, or an upload was no plain text or Markdown file. The document reads <code>
        failed
      </code>
      
      , and its reservation was released.
    </td>
    
    <td>
      Read the error that follows the line, or extract the file's text in an action of yours and add the text.
    </td>
  </tr>
  
  <tr>
    <td>
      <code>
        ai.model_failed
      </code>
    </td>
    
    <td>
      error
    </td>
    
    <td>
      Every model call a run made failed (a bad or expired key, no gateway funds, the provider's limit or outage) though its handler returned, so the run was refused <code>
        unavailable
      </code>
      
       (reason <code>
        provider_refused
      </code>
      
      ) and its reservation released. The provider's error follows the line.
    </td>
    
    <td>
      Read the provider's error: rotate the key, top up the gateway, or wait out the outage.
    </td>
  </tr>
  
  <tr>
    <td>
      <code>
        ai.balance_hook_failed
      </code>
    </td>
    
    <td>
      error
    </td>
    
    <td>
      An <code>
        onCreditsLow
      </code>
      
       or <code>
        onCreditsExhausted
      </code>
      
       hook threw. The spend itself settled.
    </td>
    
    <td>
      Fix the hook; the error follows the line.
    </td>
  </tr>
  
  <tr>
    <td>
      <code>
        ai.budget_credit_failed
      </code>
    </td>
    
    <td>
      warn
    </td>
    
    <td>
      What a run did not spend could not be given back to its <code>
        budget
      </code>
      
      . The spend itself settled, and the credits stay counted until the window resets. The error follows the line.
    </td>
    
    <td>
      Nothing for one line. Repeated lines point at the <code>
        rateLimiter
      </code>
      
       mount.
    </td>
  </tr>
  
  <tr>
    <td>
      <code>
        ai.reservation_close_failed
      </code>
    </td>
    
    <td>
      error
    </td>
    
    <td>
      A spend reached the provider, but its reservation was not closed.
    </td>
    
    <td>
      Nothing: the balance re-syncs on the next refresh. Repeated lines point at the provider.
    </td>
  </tr>
  
  <tr>
    <td>
      <code>
        ai.stream_release_unscheduled
      </code>
    </td>
    
    <td>
      warn
    </td>
    
    <td>
      The release timer for a stream's reservation was not scheduled.
    </td>
    
    <td>
      Nothing: the pending-spend TTL releases it.
    </td>
  </tr>
  
  <tr>
    <td>
      <code>
        ai.stream_spend_lost
      </code>
    </td>
    
    <td>
      error
    </td>
    
    <td>
      A stream was delivered, but its spend never reached the provider; the reservation was released.
    </td>
    
    <td>
      The user was not charged for that stream. Repeated lines point at the provider.
    </td>
  </tr>
  
  <tr>
    <td>
      <code>
        ai.job_step_failed
      </code>
    </td>
    
    <td>
      warn
    </td>
    
    <td>
      An attempt of a job's step failed. A <code>
        429
      </code>
      
      , a timeout or a passing provider error is tried again, up to 4 attempts; anything else fails the job. The provider's error follows the line, with the job's id.
    </td>
    
    <td>
      A burst after a launch is the model's limit adapting (<a href="https://nuxt-backend.dev/docs/build/ai/jobs/model-limits">
        Keep models under their limits
      </a>
      
      ). Many with the same error point at a prompt or a model.
    </td>
  </tr>
  
  <tr>
    <td>
      <code>
        ai.job_failed
      </code>
    </td>
    
    <td>
      error
    </td>
    
    <td>
      A job's own code threw an error that is no catalog one: the job failed <code>
        unavailable
      </code>
      
       (reason <code>
        job_failed
      </code>
      
      ), was refunded and waits in the Queue tab's dead letters.
    </td>
    
    <td>
      Fix the code, then retry the job from the dead letters. Throw <code>
        backendError(...)
      </code>
      
       for what a retry can't fix.
    </td>
  </tr>
  
  <tr>
    <td>
      <code>
        ai.job_stalled
      </code>
    </td>
    
    <td>
      error
    </td>
    
    <td>
      A running job showed no sign of life for its <code>
        stallAfter
      </code>
      
      : the queue failed it <code>
        unavailable
      </code>
      
       (reason <code>
        stalled
      </code>
      
      ) and refunded it.
    </td>
    
    <td>
      A step that runs past the action limit, or a deployment that was stopped (a Convex usage limit), leaves this. Keep each step to one model call.
    </td>
  </tr>
  
  <tr>
    <td>
      <code>
        ai.job_refund_retry
      </code>
    </td>
    
    <td>
      warn
    </td>
    
    <td>
      A failed job's refund did not reach the billing provider. The queue tries it again, a minute later and doubling, up to eight tries.
    </td>
    
    <td>
      Nothing while it lands later. Read the error after the line when it keeps failing (a missing customer, the provider down).
    </td>
  </tr>
  
  <tr>
    <td>
      <code>
        ai.job_refund_failed
      </code>
    </td>
    
    <td>
      error
    </td>
    
    <td>
      A failed job's refund failed every try: its credits are still owed (<code>
        refundOwed: given_up
      </code>
      
       on its row).
    </td>
    
    <td>
      Fix what the error names, then retry the job from the Queue tab: it runs on the charge it already paid, with no new hold.
    </td>
  </tr>
  
  <tr>
    <td>
      <code>
        ai.job_billing_wait
      </code>
    </td>
    
    <td>
      warn
    </td>
    
    <td>
      A job's hold or its charge at start found billing not synced for its owner yet: no credit meter on the balance yet, or no billing customer yet (<code>
        not_ready
      </code>
      
      ). The step waits five seconds, doubling, six times in all, its hold still taken, then fails the job with that refusal.
    </td>
    
    <td>
      Nothing while it passes. When jobs fail <code>
        not_ready
      </code>
      
      , check the owner's plan grants the credit meter, and that its free plan start made the customer.
    </td>
  </tr>
  
  <tr>
    <td>
      <code>
        ai.job_charge_owed
      </code>
    </td>
    
    <td>
      warn
    </td>
    
    <td>
      The billing provider refused the charge of a job charged by output for a passing reason. The job ran on and ended <code>
        done
      </code>
      
      , its credits stay held, and the charge is tried again in the background.
    </td>
    
    <td>
      Nothing while it lands later. Read the error after the line when it keeps coming (a missing customer, the provider down).
    </td>
  </tr>
  
  <tr>
    <td>
      <code>
        ai.job_charge_retry
      </code>
    </td>
    
    <td>
      warn
    </td>
    
    <td>
      An owed charge's try did not reach the billing provider. The queue tries it again, a minute later and doubling, up to eight tries in all.
    </td>
    
    <td>
      Nothing while it lands later.
    </td>
  </tr>
  
  <tr>
    <td>
      <code>
        ai.job_charge_unheld
      </code>
    </td>
    
    <td>
      warn
    </td>
    
    <td>
      An owed charge's credits could not be held again while it waits: the balance could not be read. The charge is still tried, and its credits are taken as it lands.
    </td>
    
    <td>
      Nothing for one line.
    </td>
  </tr>
  
  <tr>
    <td>
      <code>
        ai.job_charge_given_up
      </code>
    </td>
    
    <td>
      error
    </td>
    
    <td>
      An owed charge failed every try: the job kept its result uncharged, and its hold went back (<code>
        owed.givenUp
      </code>
      
       on <code>
        jobs.get
      </code>
      
      ).
    </td>
    
    <td>
      Fix what the error names, then press <strong>
        Retry the charge
      </strong>
      
       on the job in the Queue tab (<code>
        retryJob
      </code>
      
      ): it owes the charge again and tries it at once. A job that failed after its charge gave up owes nothing, and shows only <strong>
        Retry
      </strong>
      
      .
    </td>
  </tr>
  
  <tr>
    <td>
      <code>
        ai.job_charge_refused
      </code>
    </td>
    
    <td>
      error
    </td>
    
    <td>
      The billing provider refused the charge of a job charged by output in a way no retry changes: a revoked access token (<code>
        401
      </code>
      
      ), a product or meter it does not have (<code>
        403
      </code>
      
      , <code>
        404
      </code>
      
      ), a request it would refuse every time. The charge was given up at once, in the job or on a background try: the job kept its result uncharged, its hold went back, and <code>
        onOwedCharge
      </code>
      
       heard <code>
        given_up
      </code>
      
      . A charge at start refused this way fails its job instead.
    </td>
    
    <td>
      Fix what the error names (the billing access token, the catalog with <code>
        billing sync
      </code>
      
      ), then press <strong>
        Retry the charge
      </strong>
      
       on the job in the Queue tab (<code>
        retryJob
      </code>
      
      ).
    </td>
  </tr>
  
  <tr>
    <td>
      <code>
        ai.job_charge_unannounced
      </code>
    </td>
    
    <td>
      error
    </td>
    
    <td>
      An owed charge ended, but <code>
        defineJobQueue({ onOwedCharge })
      </code>
      
       could not be scheduled for it. The charge's outcome stood.
    </td>
    
    <td>
      Read the error after the line, then settle your rows about that job's charge by hand, from its id.
    </td>
  </tr>
  
  <tr>
    <td>
      <code>
        ai.content_escalated
      </code>
    </td>
    
    <td>
      error
    </td>
    
    <td>
      The safety classifier flagged content in a category <code>
        setupAi({ moderation: { escalate } })
      </code>
      
       names, and it was blocked. The line names the subject, the stage and the flag.
    </td>
    
    <td>
      Look at it in the admin console's Moderation tab, and act on the account as your terms say.
    </td>
  </tr>
  
  <tr>
    <td>
      <code>
        ai.flag_unrecorded
      </code>
    </td>
    
    <td>
      warn, error
    </td>
    
    <td>
      A flagged check could not be recorded for the Moderation tab. Its verdict stood (warn); an escalated one stayed blocked, with no record for an administrator to find (error).
    </td>
    
    <td>
      Nothing for one warn line. For an error, find the content from the <code>
        ai.content_escalated
      </code>
      
       line beside it; repeated lines point at the backend component.
    </td>
  </tr>
  
  <tr>
    <td>
      <code>
        ai.job_end_unannounced
      </code>
    </td>
    
    <td>
      error
    </td>
    
    <td>
      A job ended, but <code>
        defineJobQueue({ onJobEnd })
      </code>
      
       could not be scheduled for it. Its hold's release and its refund went through.
    </td>
    
    <td>
      Read the error after the line, then settle your rows about that job by hand, from its id.
    </td>
  </tr>
  
  <tr>
    <td>
      <code>
        ai.job_cancel_failed
      </code>
    </td>
    
    <td>
      warn
    </td>
    
    <td>
      A stalled job's workflow could not be canceled. The job is already failed and refunded.
    </td>
    
    <td>
      Nothing to do: the workflow's next step finds the job ended.
    </td>
  </tr>
  
  <tr>
    <td>
      <code>
        ai.guest_claim_failed
      </code>
    </td>
    
    <td>
      error
    </td>
    
    <td>
      A visitor's guest jobs were not moved to the account that signed up in their browser: it had no workspace a minute later, or your <code>
        setupAi({ guest: { claim } })
      </code>
      
       mutation threw. The jobs still run; your rows stay where they were.
    </td>
    
    <td>
      Read the error after the line. Fix the <code>
        claim
      </code>
      
       mutation, then move the rows that name the account's jobs by hand.
    </td>
  </tr>
  
  <tr>
    <td>
      <code>
        ai.job_cost_unreported
      </code>
    </td>
    
    <td>
      warn
    </td>
    
    <td>
      A finished job's cost could not be sent to Polar's Cost Insights. Nothing was charged for it.
    </td>
    
    <td>
      The Costs dashboard misses that job. Repeated lines point at the billing provider.
    </td>
  </tr>
  
  <tr>
    <td>
      <code>
        ai.cost_unrecorded
      </code>
    </td>
    
    <td>
      warn
    </td>
    
    <td>
      What a run's model calls cost could not be recorded: a metered action, a stream, a chat reply or a knowledge embedding. The run itself went through.
    </td>
    
    <td>
      The admin console's <a href="https://nuxt-backend.dev/docs/ship/operate/monitoring#ai-cost-per-person">
        Costs tab
      </a>
      
       and the AI spend alert miss that run. Read the error after the line.
    </td>
  </tr>
  
  <tr>
    <td>
      <code>
        ai.spend_limit_reached
      </code>
    </td>
    
    <td>
      warn
    </td>
    
    <td>
      What AI cost the whole app today (UTC) reached <code>
        setupAi({ spendLimit })
      </code>
      
      . <code>
        pause_ai
      </code>
      
       is on until the next UTC day begins, <code>
        ai.spend_limit_reached
      </code>
      
       is on the activity trail, and the <code>
        ai_spend_limit
      </code>
      
       alert was raised.
    </td>
    
    <td>
      Nothing, if the day was busy. To go on today, raise <code>
        usdPerDay
      </code>
      
       and deploy, then turn <code>
        pause_ai
      </code>
      
       off (<a href="https://nuxt-backend.dev/docs/build/ai/models#cap-the-daily-spend">
        Cap the daily spend
      </a>
      
      ).
    </td>
  </tr>
  
  <tr>
    <td>
      <code>
        ai.spend_limit_reset
      </code>
    </td>
    
    <td>
      info
    </td>
    
    <td>
      A new UTC day began, and the <code>
        pause_ai
      </code>
      
       the spend limit turned on is off again. A pause an administrator set stays.
    </td>
    
    <td>
      Nothing.
    </td>
  </tr>
  
  <tr>
    <td>
      <code>
        ai.known_abuse_matched
      </code>
    </td>
    
    <td>
      error
    </td>
    
    <td>
      An image matched the known-abuse list (<code>
        knownAbuse
      </code>
      
      ): the check was blocked and escalated, the image went to no other provider, and its flag keeps the SHA-256, never the image.
    </td>
    
    <td>
      Follow the <a href="https://nuxt-backend.dev/docs/ship/compliance/moderation/csam-playbook">
        CSAM playbook
      </a>
      
      : preserve the record, report the match, and suspend the account.
    </td>
  </tr>
  
  <tr>
    <td>
      <code>
        ai.provenance_unsigned
      </code>
    </td>
    
    <td>
      warn
    </td>
    
    <td>
      Generated images are stored with the IPTC source type only, no signed C2PA manifest: <code>
        PROVENANCE_PRIVATE_KEY
      </code>
      
       and <code>
        PROVENANCE_CERTIFICATE
      </code>
      
       are not both set, cannot be read, do not match, or signing failed. The line says which. Once per isolate.
    </td>
    
    <td>
      Run <code>
        npx nuxt-backend env push
      </code>
      
       (<code>
        --prod
      </code>
      
       for production): it generates the pair when <code>
        .env.local
      </code>
      
       has none. A key of your own must be a PKCS #8 PEM (<code>
        BEGIN PRIVATE KEY
      </code>
      
      ), P-256, P-384 or RSA, its certificate first in the chain (<a href="https://nuxt-backend.dev/docs/build/ai/provenance#the-signing-key">
        Label AI-generated content
      </a>
      
      ).
    </td>
  </tr>
  
  <tr>
    <td>
      <code>
        ai.provenance_skipped
      </code>
    </td>
    
    <td>
      warn
    </td>
    
    <td>
      A generated file was stored without the package's manifest: its format carries none (the line names the type; JPEG, PNG and WebP do), or it carried content credentials of its own, which were kept. Its provenance record was written. Once per isolate.
    </td>
    
    <td>
      Nothing for a model's own credentials. For another format, convert the image to PNG, JPEG or WebP before <code>
        ctx.storeImage
      </code>
      
      .
    </td>
  </tr>
  
  <tr>
    <td>
      <code>
        ai.moderation_unreadable
      </code>
    </td>
    
    <td>
      error
    </td>
    
    <td>
      The safety classifier answered something other than a verdict (<code>
        safe
      </code>
      
      , or <code>
        unsafe
      </code>
      
       and its categories), so the content was refused as unchecked (<code>
        unavailable
      </code>
      
      , reason <code>
        provider_refused
      </code>
      
      ).
    </td>
    
    <td>
      Check that <code>
        setupAi({ moderation })
      </code>
      
       names a classifier such as <code>
        meta-llama/llama-guard-4-12b
      </code>
      
      , not a chat model (<a href="https://nuxt-backend.dev/docs/build/ai/content-safety">
        Keep content safe
      </a>
      
      ).
    </td>
  </tr>
  
  <tr>
    <td>
      <code>
        ai.moderation_failed
      </code>
    </td>
    
    <td>
      error
    </td>
    
    <td>
      The safety classifier's call failed (an error of its provider, which the line names when the gateway passed one on) or gave no answer within 30 seconds, so the content was refused as unchecked (<code>
        unavailable
      </code>
      
      , reason <code>
        provider_refused
      </code>
      
      ).
    </td>
    
    <td>
      Try again: a passing provider error clears. If it repeats, check the gateway's status and that <code>
        setupAi({ moderation })
      </code>
      
       names a classifier the gateway serves (<a href="https://nuxt-backend.dev/docs/build/ai/content-safety">
        Keep content safe
      </a>
      
      ).
    </td>
  </tr>
  
  <tr>
    <td>
      <code>
        ai.moderation_images_unchecked
      </code>
    </td>
    
    <td>
      error
    </td>
    
    <td>
      Images were passed to a check whose classifier reads text only, such as <code>
        openai/gpt-oss-safeguard-20b
      </code>
      
      : the check was refused as unchecked (<code>
        unavailable
      </code>
      
      , reason <code>
        not_configured
      </code>
      
      ), never passed as safe. Once per isolate.
    </td>
    
    <td>
      Name a classifier that reads images, such as Llama Guard 4 on the Convex AI Gateway.
    </td>
  </tr>
  
  <tr>
    <td>
      <code>
        reports.describe_failed
      </code>
    </td>
    
    <td>
      warn
    </td>
    
    <td>
      Your <code>
        setupAdmin({ reports })
      </code>
      
       <code>
        describe
      </code>
      
       threw for a reported row: the Reports tab shows it as gone, and a report of it is refused. The error follows the line.
    </td>
    
    <td>
      Fix <code>
        describe
      </code>
      
      ; it should answer <code>
        null
      </code>
      
       for a row it does not describe.
    </td>
  </tr>
  
  <tr>
    <td>
      <code>
        reports.copies_unmatched
      </code>
    </td>
    
    <td>
      warn · error
    </td>
    
    <td>
      An intimate image was removed, but one of the files its <code>
        describe
      </code>
      
       names could not be matched: <code>
        setupStorage
      </code>
      
       does not keep it (warn), or its bytes could not be read (error). Its identical copies were not removed, and the same bytes are not refused.
    </td>
    
    <td>
      Find and remove the copies by hand. Name only <code>
        setupStorage
      </code>
      
       uploads in <code>
        describe
      </code>
      
      's <code>
        files
      </code>
      
      .
    </td>
  </tr>
  
  <tr>
    <td>
      <code>
        reports.honeypot
      </code>
    </td>
    
    <td>
      info
    </td>
    
    <td>
      A report or a notice filled the hidden honeypot field, which people never see: it was taken for a bot's, and nothing was filed, mailed or counted.
    </td>
    
    <td>
      Many lines at once are a bot. If a person's notice lands here, their browser filled the field: check that your form hides the honeypot's wrapper (<code>
        bind.honeypot
      </code>
      
      ) and keeps the input's own name.
    </td>
  </tr>
  
  <tr>
    <td>
      <code>
        reports.email_unsent
      </code>
    </td>
    
    <td>
      error
    </td>
    
    <td>
      A content-duty email (a notice's receipt or outcome, a statement of reasons, an appeal's outcome) could not be sent. The decision stands.
    </td>
    
    <td>
      Tell the person another way: the law asks that they hear of it. Repeated lines point at the email setup.
    </td>
  </tr>
  
  <tr>
    <td>
      <code>
        audit.recorded
      </code>
    </td>
    
    <td>
      info
    </td>
    
    <td>
      An event was recorded on the <a href="https://nuxt-backend.dev/docs/build/auth/admin/audit-log">
        activity trail
      </a>
      
      : the line names its type and its id, never who or what it is about. One line per event, written with the row: a mutation that fails after recording rolls the row back, but not the line, so an id here may name no row.
    </td>
    
    <td>
      Nothing: it is the record that the trail wrote one. Search by the id to tie an <code>
        onEvent
      </code>
      
       run to its event.
    </td>
  </tr>
  
  <tr>
    <td>
      <code>
        audit.record_failed
      </code>
    </td>
    
    <td>
      warn
    </td>
    
    <td>
      An event (a sign-in, a passkey, a workspace or an administrator change, a billing webhook, a checkout, a gift, a bounce, an export) was not recorded on the activity trail. What it records went through.
    </td>
    
    <td>
      Read the error that follows the line. A deployment older than its component, without the audit module, records nothing until it is deployed again.
    </td>
  </tr>
  
  <tr>
    <td>
      <code>
        audit.forward_failed
      </code>
    </td>
    
    <td>
      warn
    </td>
    
    <td>
      An event was recorded, but the app's <code>
        onEvent
      </code>
      
       action was not scheduled with it: its reference does not name an internal action the deployment has.
    </td>
    
    <td>
      Check that <code>
        setupAudit({ onEvent })
      </code>
      
       names the action <code>
        backend/audit.ts
      </code>
      
       exports, and deploy.
    </td>
  </tr>
  
  <tr>
    <td>
      <code>
        funnel.count_failed
      </code>
    </td>
    
    <td>
      warn
    </td>
    
    <td>
      An event was recorded, but the <a href="https://nuxt-backend.dev/docs/build/growth/measure">
        growth funnel
      </a>
      
       or an <a href="https://nuxt-backend.dev/docs/build/growth/measure/experiments">
        experiment
      </a>
      
       did not count it: the step, the week of activity or the goal it was is missing from the Analytics tab. The event stands.
    </td>
    
    <td>
      Read the error after the line. A deployment older than its component (without the <code>
        funnelCounts
      </code>
      
       aggregate) counts nothing until it is deployed again.
    </td>
  </tr>
  
  <tr>
    <td>
      <code>
        notifications.deliver_failed
      </code>
    </td>
    
    <td>
      warn
    </td>
    
    <td>
      An event was recorded, but a <a href="https://nuxt-backend.dev/docs/build/email/notifications">
        notification
      </a>
      
       for it was not delivered on one of its channels. The event, the other channels and what recorded it went through.
    </td>
    
    <td>
      Read the error after the line. Nothing is lost on the trail: the event is there, and the person read nothing of it in the inbox.
    </td>
  </tr>
  
  <tr>
    <td>
      <code>
        notifications.push_device_gone
      </code>
    </td>
    
    <td>
      info
    </td>
    
    <td>
      A device's push service answered <code>
        404
      </code>
      
       or <code>
        410
      </code>
      
      : the browser unsubscribed or the device went away. Its subscription was dropped.
    </td>
    
    <td>
      Nothing: the person subscribes again from <code>
        usePushSubscription
      </code>
      
       on that device when they want push there.
    </td>
  </tr>
  
  <tr>
    <td>
      <code>
        notifications.push_too_large
      </code>
    </td>
    
    <td>
      warn
    </td>
    
    <td>
      A push service answered <code>
        413
      </code>
      
      : the message was too large, and was dropped. The inbox and the email carry the notification.
    </td>
    
    <td>
      Shorten the kind's words, or the values its event carries (<a href="https://nuxt-backend.dev/docs/build/email/notifications/web-push">
        Web push
      </a>
      
      ).
    </td>
  </tr>
  
  <tr>
    <td>
      <code>
        notifications.push_failed
      </code>
    </td>
    
    <td>
      warn
    </td>
    
    <td>
      A push service stayed busy (<code>
        429
      </code>
      
       or <code>
        5xx
      </code>
      
      ) through every try: the push did not reach that device.
    </td>
    
    <td>
      Nothing, unless it repeats for every device: then the push service is down.
    </td>
  </tr>
  
  <tr>
    <td>
      <code>
        notifications.push_refused
      </code>
    </td>
    
    <td>
      error
    </td>
    
    <td>
      A push service refused a push (<code>
        400
      </code>
      
       or <code>
        403
      </code>
      
      ): <code>
        PUSH_PUBLIC_KEY
      </code>
      
       and <code>
        PUSH_PRIVATE_KEY
      </code>
      
       are not one pair, or not the pair the device subscribed with.
    </td>
    
    <td>
      Never replace a pair a deployment has: restore the one the devices subscribed with. With new keys, each device must subscribe again (<a href="https://nuxt-backend.dev/docs/build/email/notifications/web-push#create-the-keys">
        Create the keys
      </a>
      
      ).
    </td>
  </tr>
  
  <tr>
    <td>
      <code>
        account.deletion_email_unsent
      </code>
    </td>
    
    <td>
      warn
    </td>
    
    <td>
      An account's scheduled deletion, or its cancellation, was not announced by email: <code>
        setupAccount
      </code>
      
       has no <code>
        email
      </code>
      
       instance, the deployment has no <code>
        SITE_URL
      </code>
      
       (the "keep my account" link needs it), or the provider refused the message. The deletion itself stands, the app shows it, and the person can still keep the account.
    </td>
    
    <td>
      Pass your <code>
        setupEmail
      </code>
      
       instance to <code>
        setupAccount({ email })
      </code>
      
      , set <code>
        SITE_URL
      </code>
      
      , and read the error after the line when the provider refused. <a href="https://nuxt-backend.dev/docs/build/auth/accounts/data#delete-an-account">
        Export and delete an account
      </a>
      
       covers the flow.
    </td>
  </tr>
  
  <tr>
    <td>
      <code>
        account.deletion_postponed
      </code>
    </td>
    
    <td>
      warn
    </td>
    
    <td>
      An account's deletion came due while it was the only owner of a workspace others belong to. It waits a day, and runs once another member is an owner or the others left.
    </td>
    
    <td>
      Nothing, unless it repeats: the person makes another member an owner, or an administrator does.
    </td>
  </tr>
  
  <tr>
    <td>
      <code>
        account.erasure_retried
      </code>
    </td>
    
    <td>
      warn
    </td>
    
    <td>
      A participant of an account's erasure (the billing customer, the email contact, one of your sources) failed, and runs again after a wait: five tries, each wait twice the one before.
    </td>
    
    <td>
      Nothing, unless <code>
        account.erasure_failed
      </code>
      
       follows. Read the error after the line: a provider that is down passes on its own.
    </td>
  </tr>
  
  <tr>
    <td>
      <code>
        account.erasure_failed
      </code>
    </td>
    
    <td>
      error
    </td>
    
    <td>
      An account's erasure gave up on a participant after five tries, could not start its providers' part (<code>
        backend/account.ts
      </code>
      
       does not export <code>
        eraseAccountData
      </code>
      
      ), or dropped an erasure that failed 30 days ago. What that participant holds is left; the account itself is gone. Administrators read it as <code>
        account.erasure_failed
      </code>
      
       in all activity.
    </td>
    
    <td>
      Fix what the error after the line names, then run <code>
        account.forget(ctx, { userId })
      </code>
      
       for the account from an internal mutation of yours: an erasure that stopped resumes at the participant it stopped at. <code>
        components.backend.account.failedErasures
      </code>
      
       lists the ones waiting. <a href="https://nuxt-backend.dev/docs/build/auth/accounts/data#when-an-erasure-fails">
        Export and erase account data
      </a>
      
       covers it.
    </td>
  </tr>
  
  <tr>
    <td>
      <code>
        monitoring.report_failed
      </code>
    </td>
    
    <td>
      warn
    </td>
    
    <td>
      An error report or a cron check-in was not posted to the monitoring service: <code>
        MONITORING_DSN
      </code>
      
       is set but is not a DSN (said once per isolate), or the service did not take the post. What it reported on went on.
    </td>
    
    <td>
      Check the DSN against the project's in Sentry (<code>
        https://<key>@<host>/<project id>
      </code>
      
      ), then the project's quota and rate limits. <a href="https://nuxt-backend.dev/docs/ship/operate/monitoring">
        Monitoring
      </a>
      
       covers the setup.
    </td>
  </tr>
  
  <tr>
    <td>
      <code>
        monitoring.alert
      </code>
    </td>
    
    <td>
      warn
    </td>
    
    <td>
      An alert fired, once for its day or month: the email plan's daily or monthly quota passed 80% or ran out, or the day's AI spend passed twice the daily average of the seven days before (and $5). With <code>
        MONITORING_DSN
      </code>
      
       set, the same alert reached the monitoring service as an issue tagged <code>
        backend.alert
      </code>
      
      .
    </td>
    
    <td>
      Raise the email plan, or look at who spent: the admin console's <a href="https://nuxt-backend.dev/docs/ship/operate/monitoring#ai-cost-per-person">
        Costs tab
      </a>
      
      . <a href="https://nuxt-backend.dev/docs/ship/operate/monitoring#alerts">
        Monitoring
      </a>
      
       lists the alerts.
    </td>
  </tr>
  
  <tr>
    <td>
      <code>
        monitoring.alert_unread
      </code>
    </td>
    
    <td>
      warn
    </td>
    
    <td>
      The hourly alert check could not read the email provider's usage. The AI spend check still ran.
    </td>
    
    <td>
      Check <code>
        EMAIL_API_KEY
      </code>
      
       on the deployment: a key restricted to sending cannot read usage. The next hour tries again.
    </td>
  </tr>
</tbody>
</table>

Two codes of earlier previews leave with the simulators: `billing.simulator_refused` (a deployment pointed at the billing simulator) and `ai.model_simulated` (a stand-in model answered). Neither appears in `0.2.0`.


## Sitemap

See the full [sitemap](https://nuxt-backend.dev/sitemap.md) for all pages.
