Skip to content

Conversation

@Ansonhkg
Copy link
Collaborator

@Ansonhkg Ansonhkg commented Jan 9, 2026

WHAT

Log and swallow errors in the lite mainnet uptime cron runner so failures don’t terminate the loop, allowing continued health checks.

#Example Usage:

// BEFORE
await runLiteMainnetOnce(runWithStatus); // throws -> Jest exits

// AFTER
try {
  await runLiteMainnetOnce(runWithStatus);
} catch (error) {
  console.error('[lite-mainnet-uptime] Run encountered an error', error);
}

Copilot AI review requested due to automatic review settings January 9, 2026 15:56
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR fixes the lite mainnet uptime cron runner to handle failures gracefully without terminating the monitoring loop. Previously, uncaught errors would cause Jest to exit, stopping all subsequent health checks.

Key changes:

  • Added try-catch error handling in the runWithStatus wrapper to log and swallow individual test failures
  • Added try-catch error handling around runLiteMainnetOnce to catch initialization and orchestration errors

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@Ansonhkg Ansonhkg merged commit 3f7c234 into naga Jan 12, 2026
15 of 21 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants