diff --git a/src/internal/connector/onedrive/collection.go b/src/internal/connector/onedrive/collection.go index 1be32dbf0..16d442182 100644 --- a/src/internal/connector/onedrive/collection.go +++ b/src/internal/connector/onedrive/collection.go @@ -410,7 +410,12 @@ func (oc *Collection) populateItems(ctx context.Context, errs *fault.Bus) { // check for errors following retries if err != nil { - logger.Ctx(ctx).With("error", err.Error()).Error("downloading item") + if item.GetMalware() != nil { + logger.Ctx(ctx).With("error", err.Error(), "malware", true).Error("downloading item") + } else { + logger.Ctx(ctx).With("error", err.Error()).Error("downloading item") + } + el.AddRecoverable(clues.Stack(err).WithClues(ctx).Label(fault.LabelForceNoBackupCreation)) return nil, err } diff --git a/src/internal/connector/onedrive/drive.go b/src/internal/connector/onedrive/drive.go index bcc78b124..e6cab77fd 100644 --- a/src/internal/connector/onedrive/drive.go +++ b/src/internal/connector/onedrive/drive.go @@ -183,6 +183,7 @@ func defaultItemPager( "sharepointIds", "size", "deleted", + "malware", }, ) }