Skip to content

fix(backend): log failedReason when connection sync job fails#1012

Merged
brendan-kellam merged 2 commits intomainfrom
brendan/fix-connection-sync-failed-reason-logging
Mar 17, 2026
Merged

fix(backend): log failedReason when connection sync job fails#1012
brendan-kellam merged 2 commits intomainfrom
brendan/fix-connection-sync-failed-reason-logging

Conversation

@brendan-kellam
Copy link
Contributor

@brendan-kellam brendan-kellam commented Mar 17, 2026

Summary

  • When a connection sync job fails, the actual error reason (job.failedReason) was stored in the DB but never printed to the logs
  • Users saw only a generic "Failed job ... Failing job." message with no diagnostic information, even with SOURCEBOT_LOG_LEVEL=debug

🤖 Generated with Claude Code

Summary by CodeRabbit

  • Bug Fixes
    • Connection sync job failures now log the actual error reason instead of a generic message, providing better visibility for troubleshooting failed connections.

The error message from a failed connection sync job was being stored in
the DB but never surfaced in the logs, making it impossible to diagnose
failures without querying the database directly.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@github-actions

This comment has been minimized.

@coderabbitai
Copy link
Contributor

coderabbitai bot commented Mar 17, 2026

Caution

Review failed

The pull request is closed.

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: 7da5a85f-4344-4549-aef2-ed57146bd14b

📥 Commits

Reviewing files that changed from the base of the PR and between ca63bf2 and 5c03e83.

📒 Files selected for processing (2)
  • CHANGELOG.md
  • packages/backend/src/connectionManager.ts

Walkthrough

This PR enhances error logging for failed connection sync jobs by capturing and displaying the actual failure reason instead of a generic message. Changes include updating the logging statement in the connection manager and documenting this fix in the changelog.

Changes

Cohort / File(s) Summary
Connection Sync Job Failure Logging
CHANGELOG.md, packages/backend/src/connectionManager.ts
Updated onJobMaybeFailed to log job failure reason via job.failedReason and added corresponding changelog entry documenting the fix.

Estimated code review effort

🎯 1 (Trivial) | ⏱️ ~2 minutes

Possibly related PRs

✨ Finishing Touches
  • 📝 Generate docstrings (stacked PR)
  • 📝 Generate docstrings (commit on current branch)
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch brendan/fix-connection-sync-failed-reason-logging
📝 Coding Plan
  • Generate coding plan for human review comments

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@brendan-kellam brendan-kellam merged commit a8c5568 into main Mar 17, 2026
6 checks passed
@brendan-kellam brendan-kellam deleted the brendan/fix-connection-sync-failed-reason-logging branch March 17, 2026 19:12
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.

1 participant