Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions pkg/sync/syncer.go
Original file line number Diff line number Diff line change
Expand Up @@ -492,6 +492,11 @@
s.state.FinishAction(ctx)
continue
}
if codes.Code(status.Code(err)) == codes.NotFound && s.syncType == connectorstore.SyncTypePartial {

Check failure on line 495 in pkg/sync/syncer.go

View workflow job for this annotation

GitHub Actions / go-lint

unnecessary conversion (unconvert)
l.Warn("sync targeted resource not found, continuing to sync other resources", zap.Any("stateAction", stateAction), zap.Error(err))
s.state.FinishAction(ctx)
continue
}
Copy link

Choose a reason for hiding this comment

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

Bug: Unreachable Error Handling in Sync Logic

The new if block for codes.NotFound errors in partial syncs is unreachable. The preceding isWarning(ctx, err) check already handles NotFound errors and continues, preventing this specific logic from executing. The codes.Code(status.Code(err)) conversion is also redundant.

Fix in Cursor Fix in Web

if !retryer.ShouldWaitAndRetry(ctx, err) {
return err
}
Expand Down
Loading