Error Handling
Common errors and how to handle them.Error Response Format
All errors return JSON with status, error code, and message:HTTP Status Codes
| Status | Meaning |
|---|---|
200 | Success |
201 | Created |
204 | No Content (successful deletion) |
400 | Bad Request (invalid params) |
401 | Unauthorized (invalid API key/token) |
404 | Not Found (resource missing) |
422 | Validation Error (invalid format) |
500 | Server Error |
Common Errors
401 - Invalid API Key
Error:- Check API key format (should start with
mk_) - Verify in Moorcheh console
- Generate new key if needed
401 - Missing Session Token
Error:- Activate agent:
POST /agents/{agent_id}/activate - Get session_token from response
- Include in
X-Session-Tokenheader
401 - Expired Session Token
Error:404 - Agent Not Found
Error:- List agents:
GET /agents - Verify agent name
- Create if missing:
POST /agents
422 - Validation Error
Error:- Check parameter format
- Use valid memory types
- Ensure required fields present
500 - Server Error
Error:- Check MEMANTO server logs
- Verify Moorcheh connectivity
- Retry after a few seconds
- Contact support if persists