Errors and conflicts
Check HTTP status before interpreting the response as a story document. Error responses include a machine-readable code; use the returned code rather than matching a human-readable sentence.
| Status | Meaning | Response |
|---|---|---|
| 400 | Invalid request parameters | Correct the request |
| 401 | Missing, invalid, or expired session | Authenticate again |
| 403 | Insufficient permission | Stop; do not bypass the authorization check |
| 404 | Story, content, or route missing | Check the ID and API availability |
| 409 | Revision or progress conflict | Reload and reconcile |
| 415 | Unsupported content type | Send the required JSON content type |
| 422 | Invalid document or operation | Correct the submitted data |
A network timeout is not proof that a write failed. Before repeating a save, read the current revision and inspect whether the intended change already arrived. Preserve the pending edit until the outcome is known.
Do not work around a 403 by changing the actor ID, using another person's cookie, calling a database writer, or accessing a storage bucket directly.