Error codes

INVALID_INPUT

A value in the request is not valid.

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

What it means

A value in the request is not valid.

Common causes

  • A value has the wrong format, is out of range, or names something that does not exist.

Fix it

  1. Read field in the error: it names the value that was refused.
  2. Correct it and run the command again. Nothing was changed.

In JSON and the SDK

With --json, the CLI prints:

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

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