1
mirror of https://github.com/rclone/rclone synced 2025-01-15 19:47:38 +01:00
rclone/backend/b2
Nick Craig-Wood adfb1f7c7d b2: fix error handler to remove confusing DEBUG messages
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.
2023-10-28 15:18:00 +01:00
..
api b2: implement --b2-lifecycle to control lifecycle when creating buckets 2023-09-16 17:01:43 +01:00
b2_internal_test.go b2: fix chunked streaming uploads 2023-10-13 15:46:36 +01:00
b2_test.go build: fix up package paths after repo move 2019-07-28 18:47:38 +01:00
b2.go b2: fix error handler to remove confusing DEBUG messages 2023-10-28 15:18:00 +01:00
upload.go b2: fix chunked streaming uploads 2023-10-13 15:46:36 +01:00