Error code invalid_json (HTTP 400)
What Synq's `invalid_json` error code means, when the API answers HTTP 400 Bad Request with it, and how to fix it.
The body isn't JSON Synq can read: detail says where it broke, by line and column, and what JSON needs there, or that the body is empty while its Content-Type says JSON. Nothing ran.
What to do
Fix the body where detail says, or write it with a JSON serializer such as JSON.stringify, then send the request again: nothing was changed, so it is safe to.
| Field | Value |
|---|---|
code | invalid_json |
status | 400 Bad Request |
title | Invalid JSON |
Synq's APIs answer errors with a problem document (RFC 9457, application/problem+json). Its type is the address of this page, and its code is invalid_json. Branch on code, never on title or detail: a code never changes once it ships, while the words may.
{
"type": "…/errors/invalid_json",
"title": "Invalid JSON",
"status": 400,
"code": "invalid_json"
}See every error code. Still stuck? Support says where to write, what to send and where Synq's status page is.
Error code validation_failed (HTTP 400)
What Synq's `validation_failed` error code means, when the API answers HTTP 400 Bad Request with it, and how to fix it.
Error code idempotency_key_conflict (HTTP 422)
What Synq's `idempotency_key_conflict` error code means, when the API answers HTTP 422 Unprocessable Content with it, and how to fix it.