Skip to content

Webhook certificate too large · webhook.certificate_too_large

Stable ID: webhook.certificate_too_large · Evidence: source derived

The uploaded webhook certificate exceeds the server’s size limit.

The captured size describes the rejected upload; it is not the configured limit or a Telegram media limit.

Every field in a rule must match. Alternative rules are joined with OR. Codes below are JSON response fields, not inferred HTTP statuses.

  • JSON error_code: 400.

Description template; literal text must match exactly:

Bad Request: certificate size is too big ({size_bytes} bytes)
  • size_bytes: a positive safe integer, captured from the description.

See matching rules for parameter precedence and unknown or ambiguous results.

Illustrative methods: setWebhook.

  • The uploaded certificate file is larger than MAX_CERTIFICATE_FILE_SIZE.

Application decision: correct webhook certificate file. Repeat request: after payload change.

  • Verify that the uploaded file is the intended certificate and satisfies this server revision’s limit.

These are application choices. Errorgram does not retry, suppress the error, or change bot state.

Values extracted into result.facts:

  • size_bytes: a positive safe integer, from description.

Version-specific metadata is available in result.entry under facts. These values are catalogue metadata, not measurements from the response.

{
"verified_limit_bytes": 3145728,
"limit_version_source": "server-10.3"
}

Synthetic examples derived from the cited source.

API method: setWebhook.

{
"ok": false,
"error_code": 400,
"description": "Bad Request: certificate size is too big (4194304 bytes)"
}
from errorgram import classify
response = {
"ok": False,
"error_code": 400,
"description": "Bad Request: certificate size is too big (4194304 bytes)",
}
result = classify(response, method='setWebhook')
assert result.id == 'webhook.certificate_too_large'
print(result.entry["summary"])
import { classify } from "errorgram";
const response = {
"ok": false,
"error_code": 400,
"description": "Bad Request: certificate size is too big (4194304 bytes)"
};
const result = classify(response, { method: "setWebhook" });
if (result.status === "matched" && result.id === "webhook.certificate_too_large") {
console.log(result.entry.summary);
}
Integration Type or ID
Python errorgram.WebhookCertificateTooLarge
aiogram errorgram.aiogram.WebhookCertificateTooLarge extends TelegramBadRequest
grammY EnrichedGrammyError with classification.id equal to webhook.certificate_too_large

Enrichment is explicit and keeps framework catch compatibility. Follow the Python and aiogram guide or JavaScript, TypeScript, and grammY guide.

Source references identify the reviewed revision, not the first release that introduced this response.

Catalogue 0.1.0 · schema 1.0.0 · reviewed 2026-09-15.

Markdown · Condition JSON · Full catalogue and sources · JSON Schema