supermemoryai/supermemory · error · Error
Supermemory profile search failed: ${response.status} ${resp
Error message
Supermemory profile search failed: ${response.status} ${response.statusText}. ${errorText} What it means
supermemoryProfileSearch in the shared memory client throws when the profile-search HTTP call returns a non-OK status, embedding status, statusText, and the response body text. This is the core client used by middleware variants for memory injection.
Source
Thrown at packages/tools/src/shared/memory-client.ts:53
})
: JSON.stringify({
containerTag: containerTag,
})
try {
const response = await fetch(`${baseUrl}/v4/profile`, {
method: "POST",
headers: {
"Content-Type": "application/json",
Authorization: `Bearer ${apiKey}`,
},
body: payload,
...(signal ? { signal } : {}),
})
if (!response.ok) {
const errorText = await response.text().catch(() => "Unknown error")
throw new Error(
`Supermemory profile search failed: ${response.status} ${response.statusText}. ${errorText}`,
)
}
return await response.json()
} catch (error) {
if (error instanceof Error) {
throw error
}
throw new Error(`Supermemory API request failed: ${error}`)
}
}
/**
* Options for building memories text.
*/
export interface BuildMemoriesTextOptions {
containerTag: stringView on GitHub (pinned to d436792e77)
Solutions
- Parse the status from the message and fix the matching cause (auth, payload, rate limit)
- Reduce request frequency or batch queries to stay under rate limits
- Keep the SDK updated to match the current API schema
- Wrap memory search in try/catch and fall back to a plain completion
Example fix
// before
const res = await supermemoryProfileSearch(payload)
// after
let res
try {
res = await supermemoryProfileSearch(payload)
} catch (e) {
logger.warn('memory search failed, degrading', e)
res = { results: [] }
} Defensive patterns
Strategy: fallback
Try / catch
try { return await supermemoryProfileSearch(payload) } catch (e) { logger.warn('memory search unavailable', e); return { results: [] } } Prevention
- Cache recent search results to reduce call volume
- Handle rate limits with client-side throttling
When it happens
Trigger: Any memory-enhanced request path where the Supermemory search API responds 401/400/429/5xx, e.g. bad filter payload, expired key, or rate limiting during bursts of chat requests.
Common situations: High chat volume hitting rate limits; API schema changes to the search payload; key rotated but stale in deployed env.
Related errors
- Failed to add conversation: ${response.status} ${response.st
- Supermemory profile search failed: ${response.status} ${resp
- Supermemory forget memory failed: ${response.status} ${respo
- Failed to delete document
- withSupermemory: options must be an object with required con
AI-assisted analysis of supermemoryai/supermemory@d436792e77 (2026-08-28).
Data as JSON: /api/errors/52ab3cad1b14cc77.
Report an issue: GitHub.