Errors

Partner-facing statuses from mint and related endpoints. Log the body on your server; show users a calm retry / refresh message — never dump stack traces in the widget.

HTTPTypical causePartner action
400Malformed envelope, invalid payload, exp missing / too farFix payload schema; keep exp within ~10 minutes
401Unknown / revoked widget token; replayed jtiRotate or copy token from ChatAdmin; always mint with a fresh jti
403systemName not owned by this tenantAlign BOT_SYSTEM_NAME with ChatAdmin
429Rate limit (IP or tenant)Back off; mint once per page load, not on every keystroke
503Redis unavailable; tenant inactive; service degradedCheck GET /api/health; wait / alert ops — do not fall back to a hardcoded token

Widget UX

  • If mint fails before init, skip rendering the bubble or show “chat temporarily unavailable”.
  • If the session expires mid-chat, prompt refresh rather than inventing a guest user.

Ops checklist: Go-live.