Error codes

NOT_AUTHENTICATED

The request has no valid sign-in.

Exit code: 3 · Who acts: You: correct the request or the environment · From: the CLI, the SDK and the backend

What it means

The request has no valid sign-in.

Common causes

  • You have not signed in on this machine, or for this environment.
  • Your session expired.
  • The publishable key is unknown or revoked on this deployment.

Fix it

  1. Sign in: capxul auth login.
  2. Check the environment with capxul whoami; a session belongs to one environment.
  3. For an app, check that CAPXUL_PUBLISHABLE_KEY is a key this deployment issued.

In JSON and the SDK

With --json, the CLI prints:

{
  "outcome": "refused",
  "error": {
    "code": "NOT_AUTHENTICATED",
    "message": "…"
  }
}

In the SDK, a failed result has result.error.code === "NOT_AUTHENTICATED". Branch on the code, not on the message: the message is written for people and can change.

Commands that can answer with it

On this page