All error responses follow the same shape:
{
"message":"Session expired or invalid [request_id: 12346480868868238719]","success":false
}
The request_id is always included at the end of the error message so you can look it up in the server logs aswell as being included in the message part so it is displayed to users/clients.
The length of the request_id is capped at 32 Numbers and shouldnt be shorter than like 8)
Some endpoints might include extra fields (like endpoint for toolkit errors or results for batch query errors) but success and error are always there.
The following status codes (and what they mean) should be returned by JsonDerulo API compliant server
| Code | When |
|---|---|
| 200 | everything worked and Json Derulo is happy |
| 400 | bad request, missing fields, invalid table or column names, too many WHERE conditions, etc. |
| 401 | no token provided, token invalid or expired |
| 403 | you dont have permission (power level too low, IP not whitelisted, table access denied) |
| 404 | toolkit not found or disabled, endpoint path doesnt exist |
| 429 | rate limited, wait and try again |
| 500 | server error, database query failed, config reload failed, json derulo died |
| 502 | toolkit endpoint got an error from upstream (HTTP proxy mode) |
| 503 | database is down, depressed or having a stroke |
results array showing which sub queries succeeded and which failed.