Skip to content

Commit a8c5568

Browse files
fix(backend): log failedReason when connection sync job fails (#1012)
* fix(backend): log failedReason when connection sync job fails 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> * chore: update CHANGELOG for #1012 Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com> --------- Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com>
1 parent ca63bf2 commit a8c5568

File tree

2 files changed

+4
-1
lines changed

2 files changed

+4
-1
lines changed

CHANGELOG.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,9 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
1010
### Changed
1111
- `filterByFilepaths` in the MCP `search_code` tool now accepts regular expressions matched against the full file path, instead of treating values as escaped literals. [#1008](https://github.com/sourcebot-dev/sourcebot/pull/1008)
1212

13+
### Fixed
14+
- Connection sync job failures now log the actual error reason instead of a generic message. [#1012](https://github.com/sourcebot-dev/sourcebot/pull/1012)
15+
1316
## [4.15.7] - 2026-03-16
1417

1518
### Added

packages/backend/src/connectionManager.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -378,7 +378,7 @@ export class ConnectionManager {
378378
this.promClient.activeConnectionSyncJobs.dec({ connection: connection.name });
379379
this.promClient.connectionSyncJobFailTotal.inc({ connection: connection.name });
380380

381-
jobLogger.error(`Failed job ${job.id} for connection ${connection.name} (id: ${connection.id}). Failing job.`);
381+
jobLogger.error(`Failed job ${job.id} for connection ${connection.name} (id: ${connection.id}). Reason: ${job.failedReason}`);
382382

383383
const config = connection.config as unknown as ConnectionConfig;
384384
captureEvent('backend_connection_sync_job_failed', {

0 commit comments

Comments
 (0)