Cloud service via rclone caused to cleanup the whole repo on prune

Hello, I’ve noted the following behaviour on performing prune against remote repository via rclone:

restic ..... --repo rclone:.... prune --repack-small --repack-uncompressed
repository 50296280 opened (version 2, compression level max)
loading indexes...
[0:19] 100.00%  12876 / 12876 index files loaded
loading all snapshots...
rclone: 2024/01/02 01:14:36 ERROR : snapshots: error listing: file error 400 ()
rclone: 2024/01/02 01:14:36 ERROR : snapshots: list failed: &api.FileErrorResponse{Body:struct { Home struct { Value string "json:\"value\""; Error string "json:\"error\"" } "json:\"home\"" }{Home:struct { Value string "json:\"value\""; Error string "json:\"error\"" }{Value:"", Error:""}}, Status:400, Account:"************", Time:1704147276201, Message:""} *api.FileErrorResponse
finding data that is still in use for 0 snapshots
[0:00]          0 snapshots
searching used packs...
collecting packs for deletion and repacking
[0:10] 100.00%  80346 / 80346 packs processed

to repack:             0 blobs / 0 B
this removes:          0 blobs / 0 B
to delete:      13883195 blobs / 8.042 TiB
total prune:    13883195 blobs / 8.042 TiB
remaining:             0 blobs / 0 B
unused size after prune: 0 B ( of remaining size)

rebuilding index
[0:00]          0 packs processed
deleting obsolete index files
[2:58] 100.00%  12876 / 12876 files deleted
removing 80346 old packs
  signal interrupt received, cleaning up
unable to remove <data/052bbba5ec> from the repository
unable to remove <data/15f81309aa> from the repository
unable to remove <data/111554a492> from the repository
unable to remove <data/88c439a624> from the repository
unable to remove <data/941083fd47> from the repository
[0:17] 1.67%  1339 / 80346 files deleted
done

While it become to remove packs I’ve pressed Ctrl+C.
The case looks like rclone<->restic API failure on cloud service error propagation which made restic to miss an error and handle 0 snapshots.

→ rclone version
rclone v1.65.0
- os/version: darwin 14.2.1 (64 bit)
- os/kernel: 23.2.0 (x86_64)
- os/type: darwin
- os/arch: amd64
- go/version: go1.21.4
- go/linking: dynamic
- go/tags: none
→ restic version
restic 0.16.2 compiled with go1.21.3 on darwin/amd64

See `restic prune` wipes repo if snapshot listing fails · Issue #4612 · restic/restic · GitHub