{
  "id": "text.too_long",
  "category": "request_validation",
  "summary": "The text exceeds the limit checked by this response path.",
  "match_any": [
    {
      "error_code": 400,
      "description_exact": "Bad Request: text is too long"
    }
  ],
  "scope": {
    "method_examples": [
      "sendMessage",
      "editMessageText",
      "sendPhoto"
    ],
    "exhaustive": false
  },
  "possible_causes": [
    "Text supplied to the formatting helper exceeds its local byte-size guard."
  ],
  "diagnostic_limits": "The local guard is not the public character limit for every method. Other message and caption limits can produce different descriptions.",
  "evidence": [
    {
      "source": "server-10.3",
      "path": "telegram-bot-api/Client.cpp",
      "lines": [
        11955,
        11958
      ],
      "note": "The formatting helper rejects text.size() greater than 32768 before parsing."
    },
    {
      "source": "server-10.3",
      "path": "telegram-bot-api/Client.cpp",
      "lines": [
        13800,
        13803
      ],
      "note": "Method validation errors are passed to the response normalizer."
    },
    {
      "source": "server-10.3",
      "path": "telegram-bot-api/Client.cpp",
      "lines": [
        165,
        205
      ],
      "note": "Adds the code-specific prefix and lowercases only the initial character of ordinary messages."
    }
  ],
  "example": {
    "method": "sendMessage",
    "response": {
      "ok": false,
      "error_code": 400,
      "description": "Bad Request: text is too long"
    }
  },
  "evidence_level": "source_derived",
  "guidance": {
    "action": "shorten_text_for_method",
    "repeat_request": "after_relevant_change",
    "preconditions": [
      "Check the selected method’s text or caption limits and preserve valid formatting when shortening or splitting text."
    ]
  }
}
