HTTP Status Codes
400 Bad Request
The request was malformed or missing required parameters. Common causes:- Missing required JSON fields
- Invalid JSON syntax
- Empty query string
- Invalid UUID format for memory/KB IDs
- Check request body matches endpoint schema
- Validate JSON with
jqbefore sending - Verify all required parameters are present
401 Unauthorized
Authentication failed. The API key is missing, invalid, or expired. Common causes:- Missing
Authorizationheader - Malformed header (not
Bearer <token>) - Bearer token doesn’t match any key hash in the database
- Key is inactive (user disabled it)
- Key has expired
403 Forbidden
Authentication succeeded but the user is not allowed to access this resource. Common causes:- Memory belongs to a different user
- Knowledge base belongs to a different user
- User’s tier doesn’t support this operation
- Channel scope mismatch (memory in channel A, user in channel B)
- Verify the resource ID belongs to the authenticated user
- Check user tier restrictions (Free vs Pro vs Ultra)
- Confirm channel scope if applicable
429 Too Many Requests
Rate limit exceeded for the user’s tier. Common causes:- Burst of requests exceeding per-minute limit
- Multiple API keys hitting the same tier bucket
- Bot or automation hitting limits
- Shared API key across team members
500 Internal Server Error
An unexpected error occurred on the server. Common causes:- Database connection failure
- Embedding service timeout
- Uncaught exception in endpoint handler
- Convex backend unavailability
- Note the
requestIdand report it to support - Check server logs (if you have access)
- Verify Convex deployment is healthy
- Retry after a short delay (transient failures)
Memory Blocking Errors
Some memories may be blocked from being written or recalled due to content policy violations.Memory Blocked on Write
Whencrystal_remember fails to save a memory:
violent_content— memory contains instructions for harmillegal_activity— memory documents illegal actionspersonal_info_exposure— memory exposes PII without consentcopyright_violation— memory reproduces copyrighted text
- Review the memory content
- Remove the flagged content
- Rewrite with more general language
- Contact support if you believe it’s a false positive (include
threatId)
Memory Blocked on Recall
Blocked memories are silently filtered from search results. You won’t see an error, but some expected memories won’t appear. How to debug:Embedding and Deduplication Errors
Embedding Service Timeout
The embedding service (Google Gemini or OpenAI) didn’t respond within timeout.- Retry after 5–10 seconds
- Check if embedding provider status page shows outages
- Check that
OPENAI_API_KEYor Gemini credentials are valid - If persistent, contact support
Deduplication Conflict
A memory with identical content already exists.- Decide: use the existing memory or update it with
crystal_edit - Or create a new memory with slightly different wording
- The
existingMemoryIdcan be used withcrystal_traceto see context
Knowledge Base Errors
Knowledge Base Not Found
Referenced KB ID doesn’t exist or belongs to a different user.Import Batch Too Large
Chunk import batch exceeds size limits.- Split into multiple import requests
- Combine related chunks before importing
Invalid Chunk Metadata
Chunk structure doesn’t match expected schema.Debugging Checklist
When something fails:-
Check authentication:
-
Verify endpoint is correct:
- Recall:
POST /api/mcp/recall - Remember:
POST /api/mcp/capture - Stats:
GET /api/mcp/stats
- Recall:
-
Validate request body:
-
Test with minimal request:
-
Check rate limits:
-
Enable verbose logging:
Getting Help
If you’ve gone through the checklist:- Save the full error response (redact API keys)
- Note your
requestIdfrom the response header - Include your tier/plan
- Report to support with a minimal reproduction case
