diegosouzapw/OmniRoute · error
Refusing to persist quotaWindowThresholds with rejected keys
Error message
Refusing to persist quotaWindowThresholds with rejected keys: ${result.rejected.join(", ")} What it means
Error "Refusing to persist quotaWindowThresholds with rejected keys: ${result.rejected.join(", ")}" thrown in diegosouzapw/OmniRoute.
Source
Thrown at src/lib/db/providers.ts:673
"healthCheckInterval",
];
for (const field of optionalFields) {
if (data[field] !== undefined && data[field] !== null) {
connection[field] = data[field];
}
}
if (normalizedProviderSpecificData && Object.keys(normalizedProviderSpecificData).length > 0) {
connection.providerSpecificData = normalizedProviderSpecificData;
}
// Sanitize the window-thresholds map up front so the in-memory `connection`
// matches the row we're about to insert. The serialize path runs the same
// sanitizer on the way to SQLite. Assigning null (when sanitize collapses
// to no-overrides) keeps the field present on the returned object so the
// UI can tell "field was read, no overrides" apart from "field absent."
if ("quotaWindowThresholds" in connection) {
const result = sanitizeQuotaWindowThresholds(connection.quotaWindowThresholds);
if (result.rejected.length > 0) {
throw new Error(
`Refusing to persist quotaWindowThresholds with rejected keys: ${result.rejected.join(", ")}`
);
}
connection.quotaWindowThresholds = result.sanitized;
}
// Same sanitization for rateLimitOverrides — keep in-memory representation
// in sync with what gets persisted. Reject (don't silently drop) invalid
// keys/values so a direct DB writer can't lose operator intent.
if ("rateLimitOverrides" in connection) {
const result = sanitizeRateLimitOverrides(connection.rateLimitOverrides);
if (result.rejected.length > 0) {
throw new Error(
`Refusing to persist rateLimitOverrides with rejected keys: ${result.rejected.join(", ")}`
);
}
connection.rateLimitOverrides = result.sanitized;
}View on GitHub (pinned to a179ffed5b)
When it happens
Trigger: Thrown at src/lib/db/providers.ts:673 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/779c4bd5a586d362.
Report an issue: GitHub.