Thrown when the write collector circuit breaker trips — either the pending buffer hit the 5000-key cap or the database became unreachable. The app should catch this and enter a graceful read-only mode.
try { await db.schema("economy").table("balances").key(userId).set({ coins: 100 });} catch (err) { if (err instanceof DatabaseUnavailableError) enterReadOnlyMode();} Copy
try { await db.schema("economy").table("balances").key(userId).set({ coins: 100 });} catch (err) { if (err instanceof DatabaseUnavailableError) enterReadOnlyMode();}
Optional
Readonly
Thrown when the write collector circuit breaker trips — either the pending buffer hit the 5000-key cap or the database became unreachable. The app should catch this and enter a graceful read-only mode.
Example