Error Handling
HTTP status codes and error response format.
Error response format
All error responses follow a consistent JSON format:
{"error": true, "code": 403, "message": "Invalid token. Please log in and try again."}
HTTP status codes
| Code | Meaning |
|---|---|
| 200 | Success |
| 201 | Created (file upload) |
| 400 | Invalid request data, missing parameters, or malformed JSON |
| 401 | Authentication failed (wrong password, unknown user) |
| 403 | Invalid token or insufficient permissions |
| 404 | Resource, item, property, service, or method not found |
| 405 | HTTP method not supported for this endpoint |
| 500 | Internal server error (e.g. resource could not be accessed) |
| 502 | Service call returned invalid data |
| 504 | Service call timed out (30 second limit) |
Common error messages
| Message | Cause |
|---|---|
Missing credentials |
Login request without user or pass |
Invalid token. Please log in and try again. |
Token expired or invalid |
Permission denied |
Authenticated but lacking the required permission |
Missing 'data' field |
POST/PUT/PATCH without data in body |
Missing item identifier |
PUT/PATCH/DELETE on a list without specifying an ID |
Item not found / Property not found |
ID or property does not exist |
Service not found |
Unknown service name |
Unknown method |
Service exists but method name is wrong |
Service call timed out |
Service did not respond within 30 seconds |
Tip:
If you receive a403 error, check that your token is still valid. Tokens expire when the server-side session times out. Simply log in again to get a fresh token.