How to exit when there's auth error?

sepal-user@sepal:~$ ~/bin/rclone config redacted
[gdrive]
type = drive
scope = drive
token = XXX

A log from the command that you were trying to run with the -vv flag

2025/04/02 17:38:18 ERROR : cccc/data/xxxx/images/xxxx/0/M-33-7-A-d-2-3_140.jpg: Failed to copy: couldn't list directory: googleapi: Error 401: Request had invalid authentication credentials. Expected OAuth 2 access token, login cookie or other valid authentication credential. See https://developers.google.com/identity/sign-in/web/devconsole-project.
More details:
Reason: authError, Message: Invalid Credentials

When you created this thread there were questions to answer. Please answer all of them for the start. In case of log file, post it all - not just some snippet.

Then explain maybe in more details what it is you want to achieve.

"How to exit when there’s auth error?" is not clear at all. At least for me.