Errors¶
Error bodies are { "detail": ... }: a message, or for 422 a list of validation errors.
| Status | Endpoint | Cause | SDK behaviour |
|---|---|---|---|
| 400 | /batch |
Invalid or truncated DEFLATE stream | Retries with backoff |
| 401 | /session |
Unknown or deactivated key | Reports refused and stops |
| 401 | /batch |
Key deactivated during the session | Retries with backoff |
| 401 | /usage, /users, /sessions |
Missing or wrong secret key | |
| 403 | /session |
Origin not on the allow-list, or consent missing or false | Reports refused and stops |
| 404 | /sessions/{id}/risk |
Not one of your sessions | |
| 404 | /batch |
Unknown, expired or erased session | Opens a new session and resends |
| 409 | /batch |
user_id differs from the session's |
Retries with backoff: fix userId |
| 410 | behavlabs.com/ml/... |
The old API path, retired in 2.4.0 | Use api.behavlabs.com |
| 413 | /session, /batch |
Device context over 16 KB; body over 512 KiB, or over 4 MiB decompressed | Drops the batch, reports dropped |
| 422 | all | Schema validation failed | Drops the batch, reports dropped |
| 5xx, network | all | Transient | Retries with backoff, 1 s to 30 s |