{
  "$id": "https://vriesdemichael.github.io/bitbucket-data-center-cli/v4.1.0/reference/schemas/output/output.error.schema.json",
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "additionalProperties": false,
  "description": "Emitted on stdout by any bb command that fails while --json is set. The presence of error rather than data marks the run as failed; exitCode matches the process exit status.",
  "properties": {
    "error": {
      "additionalProperties": false,
      "properties": {
        "details": {
          "additionalProperties": {
            "minLength": 1,
            "type": "string"
          },
          "description": "Machine-readable fields to act or branch on, keyed by name, rather than words to match in the message. Absent when there are none. bb bulk apply sets operationId, which `bb bulk status \u003cid\u003e` takes. A failure Bitbucket answered carries upstreamStatus, and upstreamException when Bitbucket named the exception.",
          "minProperties": 1,
          "type": "object"
        },
        "exitCode": {
          "description": "Process exit status, determined by kind.",
          "enum": [
            1,
            2,
            3,
            4,
            5,
            10,
            11,
            12,
            13
          ],
          "type": "integer"
        },
        "kind": {
          "description": "Error classification from the ADR-011 taxonomy.",
          "enum": [
            "authentication",
            "authorization",
            "validation",
            "not_found",
            "conflict",
            "transient",
            "permanent",
            "not_implemented",
            "cancelled",
            "unknown_outcome",
            "internal"
          ]
        },
        "message": {
          "description": "Human-readable failure description, without the kind prefix shown on stderr.",
          "type": "string"
        }
      },
      "required": [
        "kind",
        "message",
        "exitCode"
      ],
      "type": "object"
    },
    "meta": {
      "additionalProperties": true,
      "properties": {
        "bbVersion": {
          "description": "Version of the bb binary that produced this document. Provenance for stored output, not a compatibility switch: pin the binary to pin the contract (ADR-064).",
          "minLength": 1,
          "type": "string"
        },
        "limitReached": {
          "description": "Present on listing commands: true when the result set came back at --limit and there may be more behind it.",
          "type": "boolean"
        }
      },
      "required": [
        "bbVersion"
      ],
      "type": "object"
    }
  },
  "required": [
    "error",
    "meta"
  ],
  "title": "bb command failure",
  "type": "object"
}
