Error codes

WRONG_STATE

The request is valid, but the current state does not allow it.

Exit code: 2 · Who acts: You or another person, after you read the current state, or by waiting · From: the CLI, the SDK and the backend

What it means

The request is valid, but the current state does not allow it.

Common causes

  • The item already moved on: it was accepted, ended, paid or cancelled.
  • Setup has not finished yet.

Fix it

  1. Read the item again to see where it stands.
  2. If setup is not finished, follow next in the error.

In JSON and the SDK

With --json, the CLI prints:

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

In the SDK, a failed result has result.error.code === "WRONG_STATE". 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