@spfn/core 0.2.0-beta.54 → 0.2.0-beta.56

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/db/index.js CHANGED
@@ -1457,6 +1457,24 @@ async function runInTransaction(callback, options = {}) {
1457
1457
  "Timeout exceeds maximum",
1458
1458
  { txId, context, timeout, maxTimeout: MAX_TIMEOUT_MS }
1459
1459
  );
1460
+ validateAndThrow(
1461
+ !Number.isInteger(idleTimeout),
1462
+ `Invalid idleTimeout value: ${idleTimeout}. Must be an integer.`,
1463
+ "Invalid idleTimeout type",
1464
+ { txId, context, idleTimeout }
1465
+ );
1466
+ validateAndThrow(
1467
+ idleTimeout < 0,
1468
+ `Invalid idleTimeout value: ${idleTimeout}. Must be non-negative (0 to disable).`,
1469
+ "Invalid idleTimeout range",
1470
+ { txId, context, idleTimeout }
1471
+ );
1472
+ validateAndThrow(
1473
+ idleTimeout > MAX_TIMEOUT_MS,
1474
+ `Invalid idleTimeout value: ${idleTimeout}. Maximum is ${MAX_TIMEOUT_MS}ms.`,
1475
+ "idleTimeout exceeds maximum",
1476
+ { txId, context, idleTimeout, maxTimeout: MAX_TIMEOUT_MS }
1477
+ );
1460
1478
  const writeDb = getDatabase("write");
1461
1479
  if (!writeDb) {
1462
1480
  const error = new TransactionError({