Auth
Every authenticated call returns 401
Every authenticated call returns 401
- The token expired: supabase-js refreshes it, but a token copied into a terminal lasts about an hour.
JWT_SECRETdoesn’t match the Supabase project that issued the token, orSUPABASE_URLpoints at a different project (the issuer must be{SUPABASE_URL}/auth/v1).- The header isn’t
Authorization: Bearer <token>.
JWT authentication failed with the reason.Admin routes return 403
Admin routes return 403
public.users.role isn’t admin for that user. Check the row with the user’s sub. If the role lookup itself fails, the API logs [AuthTransform] ERROR fetching role and treats the user as having no role.Signed in to the arena, but threads or battles fail
Signed in to the arena, but threads or battles fail
public.users row on the first write. If that upsert fails (missing table, missing service key), later writes fail too. Check the logs for UserSyncService errors.Battles and models
Answers start with [System Note]
Answers start with [System Note]
Falling back to basic model in the logs, then check the provider: gateway configuration, key cooldowns in Providers & keys, or the model ID.'Need at least 2 auto-selectable models'
'Need at least 2 auto-selectable models'
A new or edited model doesn't show up
A new or edited model doesn't show up
status = active and that provider_name is groq, google or cloudflare.A model plays but isn't on the leaderboard
A model plays but isn't on the leaderboard
v_leaderboard only shows active models). If it has no model_leaderboard row, seed one (see Supabase setup).Stray models appear in ai_models
Stray models appear in ai_models
ComparisonLogger inserts a row for any model name it doesn’t recognise. A typo in a manual battle creates one. Fix the name in the client and remove or deactivate the stray row in the admin panel.Admin panel
Saving a record blanked some fields
Saving a record blanked some fields
PUT route. The API writes every DTO field, so missing ones became null. Re-enter the values and make sure the client sends the full record.Deleting a model, provider or comparison fails with 400
Deleting a model, provider or comparison fails with 400
Deleting a user didn't remove their login
Deleting a user didn't remove their login
public.users row. Remove the account itself in Supabase Auth.Infrastructure
The first request after a quiet period is slow
The first request after a quiet period is slow
/health every five minutes, so cold starts should be rare. A deploy also starts a fresh container. If they happen often, check the Worker’s cron trigger in the Cloudflare dashboard.PostgREST calls fail with 'No API key found'
PostgREST calls fail with 'No API key found'
SUPABASE_SERVICE_ROLE_KEY (or SUPABASE_SERVICE_KEY) is missing in that environment.The Telegram bot is silent
The Telegram bot is silent
Telegram__BotToken and Telegram__ApiBaseUrl are set (the bot is disabled otherwise), that the webhook points at /api/telegram/webhook (getWebhookInfo), and that no other process is long-polling the same bot.