Skip to content

"rsync for cloud storage" - Google Drive, S3, Dropbox, Backblaze B2, One Drive, Swift, Hubic, Wasabi, Google Cloud Storage, Azure Blob, Azure Files, Yandex Files

onedrive: Don't mask HTTP error codes with JSON decode error

Nick Craig-Wood05dc7183cb09
diff --git a/onedrive/onedrive.go b/onedrive/onedrive.go
index 4e96a49c1..cd4088b47 100644
--- a/onedrive/onedrive.go
+++ b/onedrive/onedrive.go
@@ -158,7 +158,7 @@ func errorHandler(resp *http.Response) error {
errResponse := new(api.Error)
err := rest.DecodeJSON(resp, &errResponse)
if err != nil {
- return err
+ fs.Debug(nil, "Couldn't decode error response: %v", err)
}
if errResponse.ErrorInfo.Code == "" {
errResponse.ErrorInfo.Code = resp.Status