Type: Bug Report
Description:
The scheduler's setInterval callback calls the async tick() function but does not catch any errors, leading to unhandled promise rejections that may crash the app or cause undefined behavior.
Current Code:
captureInterval = setInterval(() => {
tick(); // No error handling!
}, intervalMs);
Expected Behavior:
Errors in the scheduler tick should be logged but not crash the scheduler.
Proposed Fix:
captureInterval = setInterval(() => {
tick().catch((error) => {
logger.error("Scheduler tick failed:", error);
});
}, intervalMs);
Type: Bug Report
Description:
The scheduler's
setIntervalcallback calls the asynctick()function but does not catch any errors, leading to unhandled promise rejections that may crash the app or cause undefined behavior.Current Code:
Expected Behavior:
Errors in the scheduler tick should be logged but not crash the scheduler.
Proposed Fix: