Beschreibungen auf Englisch
422 — request not accepted
Was passiert ist
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.
Warum
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.
Was jetzt zu tun ist
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.
Welche Anfrage als Nächstes
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.
Wohin als Nächstes
Diese Seite einer KI geben
Spezifikation 0.0.1