Rclone return value

Hi,
I use rclone in bash scripts to copy files to a swift container.
Sometimes copying a file fails (rclone copy …) due to I guess swift overload.
I thought I could get a return code (not 0) from rclone. It seems I get not code in return.
What is the most efficient way to check if rclone copy failed so I can retry ?
Thank you for your help

rclone always returns a non zero error code if there were errors. What is likely is rclone successfully retried the failed copy and hence returned a 0 error code.

You should be able to see that looking in the log.

Post it here if you want help interpreting it.