diegosouzapw/OmniRoute · error
[quota-pools] syncQuotaCombos failed (non-fatal):
Error message
[quota-pools] syncQuotaCombos failed (non-fatal):
What it means
After a quota-pool mutation, the background sync of quota combos (dynamic import of syncQuotaCombos + execution) failed. Guarded so pool CRUD callers never break: the pool write itself succeeded, only the derived combo definitions are stale until the next successful sync.
Solutions
- Check why @/lib/quota/quotaCombos import or sync failed from the log
- Trigger a manual quota-combo sync or re-save the pool
- Verify quota combination rules for invalid references
Defensive patterns
Strategy: try-catch
When it happens
Trigger: Thrown at src/lib/db/quotaPools.ts:42 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/28ab6232a8cc9096.
Report an issue: GitHub.
Appendix: source
Thrown at src/lib/db/quotaPools.ts:42
operation: () => Promise<T>
): Promise<T> {
const previous = quotaComboMaintenance.get(poolId);
const current = previous ? previous.catch(() => undefined).then(operation) : operation();
quotaComboMaintenance.set(poolId, current);
const cleanup = () => {
if (quotaComboMaintenance.get(poolId) === current) quotaComboMaintenance.delete(poolId);
};
void current.then(cleanup, cleanup);
return current;
}
async function syncQuotaCombosGuarded(poolId: string): Promise<void> {
try {
const { syncQuotaCombos } = await import("@/lib/quota/quotaCombos");
await syncQuotaCombos(poolId);
} catch (err) {
// Guard: combo-sync failure must never break pool CRUD callers.
console.warn("[quota-pools] syncQuotaCombos failed (non-fatal):", (err as Error)?.message);
}
}
async function removeQuotaCombosGuarded(poolId: string): Promise<void> {
try {
const { removeQuotaCombosForPool } = await import("@/lib/quota/quotaCombos");
await removeQuotaCombosForPool(poolId);
} catch (err) {
console.warn(
"[quota-pools] removeQuotaCombosForPool failed (non-fatal):",
(err as Error)?.message,
);
}
}
// ---------------------------------------------------------------------------
// Local type shapes (aligned with src/lib/quota/dimensions.ts — merged by F7)
// ---------------------------------------------------------------------------View on GitHub (pinned to a179ffed5b)