{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://raw.githubusercontent.com/api-evangelist/barcodes-gg/main/json-schema/barcodes-gg-error-schema.json",
  "title": "Error",
  "description": "Error envelope. Lookups that find nothing also use it, with HTTP 200. The three metadata fields are added to v2 JSON responses produced inside the v2 route group; 401 and 429 responses do not carry them.",
  "x-generated": "2026-10-21",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/barcodes-gg-openapi.json#/components/schemas/Error",
  "type": "object",
  "required": [
    "error",
    "message"
  ],
  "properties": {
    "error": {
      "type": "boolean",
      "const": true
    },
    "message": {
      "description": "A message string, or for validation failures an object mapping each field name to a list of messages.",
      "oneOf": [
        {
          "type": "string"
        },
        {
          "type": "object",
          "additionalProperties": {
            "type": "array",
            "items": {
              "type": "string"
            }
          }
        }
      ]
    },
    "response_time": {
      "type": "string",
      "description": "Server runtime of the request, for example `41ms`."
    },
    "request_fulfilled": {
      "type": "boolean",
      "description": "True when the HTTP status is below 400."
    },
    "request_debited": {
      "type": "boolean",
      "description": "True only when the call was debited from the plan allowance."
    }
  }
}