Resources

Errors

Handle unavailable context separately from local retrieval and permission changes.

Profile and Query service errors#

The service error envelope uses JSON codes your backend can branch on. These HTTP examples apply to Profile and Query, not local Search.

HTTPCodeMeaning
401invalid_credentialsAPI key is missing, invalid, or revoked.
403domain_unavailableThis key does not have access to the requested context domain.
404context_not_foundNo active Rollup context exists for the user.
409context_not_readyThe requested operation cannot yet be supported by the available context.
429rate_limit_exceededRequest budget exceeded.
409 context_not_ready
{
  "error": {
    "code": "context_not_ready",
    "message": "User context has not reached the requested readiness level.",
    "state": "starting"
  }
}

Local Search failures#

Handle SDK errors from search() on the device. Re-check photo permissions and index readiness, and account for assets that have been removed since retrieval. An empty result can also be a valid search with no indexed matches.