Check for and ignore item not found errors (#2202)
## Description Item not found errors may appear because an item was moved or deleted between enumerating the items in a folder and fetching the data for the items in the folder. This keeps them from being reported as there is nothing we can do if the item data is no longer available. This applies to all Exchange data categories ## Does this PR need a docs update or release note? - [ ] ✅ Yes, it's included - [ ] 🕐 Yes, but in a later PR - [x] ⛔ No ## Type of change - [ ] 🌻 Feature - [x] 🐛 Bugfix - [ ] 🗺️ Documentation - [ ] 🤖 Test - [ ] 💻 CI/Deployment - [ ] 🧹 Tech Debt/Cleanup ## Issue(s) * closes #2198 ## Test Plan - [x] 💪 Manual - [ ] ⚡ Unit test - [ ] 💚 E2E
This commit is contained in:
parent
298ee35f05
commit
38b9fabb51
@ -13,6 +13,7 @@ import (
|
||||
|
||||
"github.com/microsoft/kiota-abstractions-go/serialization"
|
||||
|
||||
"github.com/alcionai/corso/src/internal/connector/graph"
|
||||
"github.com/alcionai/corso/src/internal/connector/support"
|
||||
"github.com/alcionai/corso/src/internal/data"
|
||||
"github.com/alcionai/corso/src/internal/observe"
|
||||
@ -262,7 +263,18 @@ func (col *Collection) streamItems(ctx context.Context) {
|
||||
}
|
||||
|
||||
if err != nil {
|
||||
// Don't report errors for deleted items as there's no way for us to
|
||||
// back up data that is gone. Chalk them up as a "success" though since
|
||||
// there's really nothing we can do and not reporting it will make the
|
||||
// status code upset cause we won't have the same number of results as
|
||||
// attempted items.
|
||||
if e := graph.IsErrDeletedInFlight(err); e != nil {
|
||||
atomic.AddInt64(&success, 1)
|
||||
return
|
||||
}
|
||||
|
||||
errUpdater(user, err)
|
||||
|
||||
return
|
||||
}
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user