Errors
All error responses share a common envelope:
{
"error": {
"code": 400,
"message": "ERROR_MESSAGE_VALIDATION_FAILED",
"details": {
"form": {
"errors": {
"until": ["This value should be a valid date."]
}
}
}
}
}
Status codes
| HTTP | When |
|---|---|
400 Bad Request | Request validation failed — missing or unparseable from/until, window exceeds 31 days, invalid limit/offset, or an unknown query parameter. details.form.errors lists per-field problems. |
401 Unauthorized | Missing or invalid Authorization header. |
403 Forbidden | Token lacks partner access, or venueId is not in the token's scope. (Out-of-scope venues return 403, not 404, so venue topology isn't leaked.) |
404 Not Found | venueId is unknown to Mozrest. |
5xx | Unexpected server error. Body is masked: {"error": {"code": 500, "message": "Internal Server Error", "details": null}}. Retry with backoff. |
Best practices
- Implement retries with exponential backoff for
500and503errors. Read endpoints in this API are idempotent — replaying the same request is always safe. - Surface
403distinctly from404in your monitoring. Repeated403s on a venue you previously had access to usually means the partner-venue scope changed; contactsupport@mozrest.com. - Log
400s with the fulldetails.form.errorspayload. Most400s indicate a query the client should fix, not a server problem.