mirror of
https://github.com/rclone/rclone
synced 2025-01-15 19:47:38 +01:00
adfb1f7c7d
On a 404 error, b2 returns an empty body which, before this change, caused the error handler to try to parse an empty string and give the following DEBUG message: Couldn't decode error response: EOF This is confusing as it is expected in normal operations and isn't an error. This change reads the body of an error response first then tries to decode it only if it isn't empty, which avoids the confusing DEBUG message. This also upgrades failure to read the body or failure to decode the JSON to ERROR messages as now we are certain that we should have something to read and decode. |
||
---|---|---|
.. | ||
api | ||
b2_internal_test.go | ||
b2_test.go | ||
b2.go | ||
upload.go |