Repository navigation
fix: capture timeout errors in cron jobs using captureError - #337
Merged
omegascorp merged 1 commit intoAug 31, 2026
Merged
Conversation
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes using default effort and found 1 potential issue.
❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.
Reviewed by Cursor Bugbot for commit 8b25cea. Configure here.
Collaborator
|
@ankit-0903 please update the PR in contains unrelated changes |
ankit-0903
force-pushed
the
fix/capture-cron-timeout-errors
branch
from
August 29, 2026 07:43
60b9045 to
3716c22
Compare
Contributor
Author
omegascorp
self-requested a review
August 31, 2026 12:01
Contributor
Author
This was referenced Sep 8, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.

Fixes #333
Description
When a cron job ran past its configured timeout, the state was quietly reset to false without logging or reporting anything. There was a TODO comment in the code for this.
Because of this, timed out cron jobs in production would fail silently without any telemetry.
Changes
aliasto the destructuring intickCronJobsloop injobs.ts.Errorinstance when a job times out and passed it tocaptureErrorfrom@/telemetry.jobs.test.tsto verify timeout errors are captured correctly.All unit tests pass and build is clean.
Note
Low Risk
Observability-only change on an existing timeout reset path; no new execution or scheduling behavior beyond error reporting.
Overview
Cron jobs that exceed their configured timeout are no longer reset silently. When
tickCronJobssees a still-running job paststartTs + timeout, it now builds an error likeCron job '…' timed out after …ms, sends it throughcaptureError, then clearsisRunningso scheduling can continue.A new unit test simulates a hung handler and advances mocked time past the 5s limit to assert
captureErrorreceives that message.Reviewed by Cursor Bugbot for commit 3716c22. Bugbot is set up for automated code reviews on this repo. Configure here.