Skip to main content

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

HTTPWhen
400 Bad RequestRequest 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 UnauthorizedMissing or invalid Authorization header.
403 ForbiddenToken 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 FoundvenueId is unknown to Mozrest.
5xxUnexpected 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 500 and 503 errors. Read endpoints in this API are idempotent — replaying the same request is always safe.
  • Surface 403 distinctly from 404 in your monitoring. Repeated 403s on a venue you previously had access to usually means the partner-venue scope changed; contact support@mozrest.com.
  • Log 400s with the full details.form.errors payload. Most 400s indicate a query the client should fix, not a server problem.