Extract Graph API error details for permissions (#2584)

## Description

Add extra information about errors to aid in debugging/reporting to the user

## 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
- [ ] 🐛 Bugfix
- [ ] 🗺️ Documentation
- [ ] 🤖 Test
- [ ] 💻 CI/Deployment
- [x] 🧹 Tech Debt/Cleanup

## Issue(s)

* closes #2581

## Test Plan

- [ ] 💪 Manual
- [ ]  Unit test
- [ ] 💚 E2E
This commit is contained in:
ashmrtn 2023-02-22 06:46:00 -08:00 committed by GitHub
parent 9c635eff5c
commit 628d2f3dec
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -224,6 +224,10 @@ func oneDriveItemPermissionInfo(
Permissions().
Get(ctx, nil)
if err != nil {
msg := support.ConnectorStackErrorTrace(err)
err = clues.Wrap(err, "fetching item permissions: "+msg).
With("item_id", *di.GetId())
return nil, err
}