Açıklamalar İngilizce
422 — request not accepted
Ne oldu
The only API response that comes OUTSIDE the common envelope: {"message": "…", "errors": {"field": ["…"]}} — it has no success field. Code like if (!res.success) works on a 422 only by coincidence, because it is comparing against undefined.
Neden
Two different sources under one code. Request validation — then the body contains errors listing the fields. A domain refusal — then there is no errors, but there is a reason: content_blocked, text_empty, text_not_voiceable, service_not_found, not_allowed, plus, for bulk chunk retry, invalid_order_status, generative_not_supported, and nothing_to_retry.
Şimdi ne yapmalı
First check whether errors is present. If it is, fix the request according to the listed fields. If it is not, but there is a reason, the request shape is not the problem, and repeating the same body gets the same refusal; read the page for that specific code.
Sırada hangi istek gönderilmeli
GET /templates/config-options?service=<code> — which config keys the service accepts at all. The structure depends on the service; do not guess it from examples for other services.
Sonra nereye gitmeli
Bu sayfayı yapay zekâya verin
spesifikasyon 0.0.1