Files
pad/internal/cli
Dan Finn 20b061902b fix(cli): surface actionable errors for cloud-mode setup failures
When a user picks Cloud mode during `pad init` but doesn't have a Pad
Cloud account, the CLI hits the cloud server and surfaces raw server
errors like "Missing CSRF token" — which is an implementation detail
that gives no indication of what went wrong or how to fix it.

This patch:

- Splits the ModeCloud and ModeRemote branches in printSetupRequiredHint
  so cloud users see "sign up or switch to local" instead of the generic
  "run pad auth setup on the server" message.
- Returns a cloud-specific error from pad init when setup_required is
  true in cloud mode.
- Intercepts csrf_error responses in the CLI HTTP client and replaces
  the raw server message with an actionable "run pad auth login"
  message, since the CLI never sends CSRF cookies and this error always
  indicates a stale or mismatched session.
2026-08-03 16:22:11 -04:00
..
2026-03-26 01:52:36 +00:00
2026-03-26 01:52:36 +00:00
2026-03-26 01:52:36 +00:00