Error Codes
All Rekall API errors follow a consistent format with HTTP status codes and Rekall-specific error codes. Use this reference to diagnose and resolve issues.
Error Format
Every error response includes a machine-readable error code, a human-readable message, the HTTP status, and a unique request ID for debugging.
{"error": {"code": "INVALID_MEMORY_TYPE","message": "The memory type 'spatial' is not supported.","status": 400,"details": {"provided": "spatial","allowed": ["episodic", "semantic", "procedural", "long-term", "short-term", "execution", "preferences"]},"request_id": "req_abc123def456"}}
HTTP Status Codes
| Status | Title | Description |
|---|---|---|
| 400 | Bad Request | The request body is malformed, missing required fields, or contains invalid values. |
| 401 | Unauthorized | The request lacks valid authentication credentials. The API key is missing, expired, or invalid. |
| 403 | Forbidden | The authenticated user does not have permission to perform the requested action. Insufficient scopes. |
| 404 | Not Found | The requested resource does not exist. The ID may be incorrect or the resource may have been deleted. |
| 409 | Conflict | The request conflicts with the current state of the resource. Common with duplicate entities or relationships. |
| 422 | Unprocessable Entity | The request is well-formed but contains semantic errors. Often related to invalid memory content or metadata. |
| 429 | Too Many Requests | Rate limit exceeded. The request was throttled based on your plan tier limits. |
| 500 | Internal Server Error | An unexpected error occurred on the server. This is not caused by your request. |
Rekall Error Codes
These application-specific error codes provide more detail about what went wrong. They are returned in the error.code field of the response.
| Code | HTTP | Description |
|---|---|---|
INVALID_MEMORY_TYPE | 400 | The specified memory type is not one of the 7 supported types. |
SCOPE_INSUFFICIENT | 403 | Your API key does not have the required scope for this endpoint. |
RATE_LIMIT_EXCEEDED | 429 | You have exceeded the rate limit for your plan tier. |
ENTITY_NOT_FOUND | 404 | The referenced entity does not exist in the knowledge graph. |
RELATIONSHIP_CONFLICT | 409 | A relationship of this type already exists between the specified entities. |
MEMORY_CONTENT_TOO_LARGE | 422 | The memory content exceeds the maximum allowed size (100KB for text, 10MB for embeddings). |
EMBEDDING_GENERATION_FAILED | 422 | The system failed to generate a vector embedding for the provided content. |
HIVE_MEMBER_LIMIT | 422 | The hive has reached the maximum number of members allowed by your plan. |
WORKFLOW_STEP_FAILED | 422 | A workflow step failed during execution. The run has been paused. |
AGENT_ALREADY_TERMINATED | 409 | The agent has already been terminated and cannot accept further operations. |
SANDBOX_PRODUCTION_MISMATCH | 403 | A sandbox key (rk_test_) was used to access production resources, or vice versa. |
CONTEXT_NOT_ACCESSIBLE | 403 | The memory context (agent, user, or hive) is not accessible with the current credentials. |
Handling Errors
Retryable errors
Errors with status 429 and 500 are generally retryable. Use exponential backoff starting at 1 second with a maximum of 5 retries.
Rate limit headers
Every response includes rate limit headers: X-RateLimit-Limit, X-RateLimit-Remaining, and X-RateLimit-Reset. Use these proactively to avoid hitting limits.
Request ID for support
Include the request_id when contacting support. It is also returned in the X-Request-Id response header.
SDK error handling
The official SDKs automatically handle retryable errors with configurable backoff. Set maxRetries in the client constructor to control retry behavior.
