diegosouzapw/OmniRoute · error · Error
HTTP
Error message
HTTP ${response.status}: ${errorText} What it means
GenericMemoryBackend.request(): the remote memory API returned a non-2xx HTTP status; the status code plus response body text (empty string on read failure) are wrapped so callers see the upstream failure.
Solutions
- On 5xx, retry with backoff — upstream stores flap
- On 4xx, fix the request payload/path mapping for the backend dialect
Defensive patterns
Strategy: retry
When it happens
Trigger: Thrown at src/lib/memory/genericBackend.ts:277 when the library encounters an invalid state.
Common situations: See trigger scenarios.
AI-assisted analysis of diegosouzapw/OmniRoute@a179ffed5b (2026-08-25).
Data as JSON: /api/errors/34ed5fb48e415184.
Report an issue: GitHub.
Appendix: source
Thrown at src/lib/memory/genericBackend.ts:277
headers["Authorization"] = `Bearer ${this.config.apiKey}`;
}
const controller = new AbortController();
const timeoutId = setTimeout(() => controller.abort(), this.config.timeout);
try {
const response = await fetch(url.toString(), {
method,
headers,
body: body ? JSON.stringify(body) : undefined,
signal: controller.signal,
});
clearTimeout(timeoutId);
if (!response.ok) {
const errorText = await response.text().catch(() => "");
throw new Error(`HTTP ${response.status}: ${errorText}`);
}
if (response.status === 204) {
return undefined as T;
}
return response.json() as Promise<T>;
} catch (e) {
clearTimeout(timeoutId);
throw e;
}
}
// ─── CRUD ───
async create(input: CreateMemoryInput): Promise<Memory> {
if (!this.initialized) await this.initialize();
View on GitHub (pinned to a179ffed5b)