microsoftgraph / msgraph-sdk-go-core

Microsoft Graph SDK for Go - Core Library
https://learn.microsoft.com/graph/sdks/sdks-overview
MIT License
20 stars 10 forks source link

fix: repeated slice uploading on large file upload task #321

Closed andrueastman closed 3 months ago

andrueastman commented 3 months ago

The uploadWithRetry does not check for that error/status but always attempts to upload the slice again even in success. Failing to do so may result in a conflict with the API.

This PR fixes the function to simply return in the event the chuck upload is successful.

Fixes https://github.com/microsoftgraph/msgraph-sdk-go-core/issues/320

sonarcloud[bot] commented 3 months ago

Quality Gate Passed Quality Gate passed

Issues
0 New issues
0 Accepted issues

Measures
0 Security Hotspots
66.7% Coverage on New Code
0.0% Duplication on New Code

See analysis details on SonarCloud