Rate limit exceeded errors should trigger retry after backoff
Tool shouldn't say backed up 94113 of 94113 messages if some failed...
$ gyb --email info@domain.co.uk --service-account
Using backup folder GYB-GMail-Backup-info@domain.co.uk
Got 94113 Message IDs
GYB needs to examine 94113 messages
GYB already has a backup of 0 messages
GYB needs to backup 94113 messages
<HttpError 403 when requesting https://gmail.googleapis.com/gmail/v1/users/me/messages/155111111112?format=raw&fields=id%2ClabelIds%2CinternalDate%2Craw&alt=json returned "Quota exceeded for quota metric 'Queries' and limit 'Queries per minute per user' of service 'gmail.googleapis.com' for consumer 'project_number:81111111150'.". Details: "[{'message': "Quota exceeded for quota metric 'Queries' and limit 'Queries per minute per user' of service 'gmail.googleapis.com' for consumer 'project_number:81111111150'.", 'domain': 'usageLimits', 'reason': 'rateLimitExceeded'}]">
<HttpError 403 when requesting https://gmail.googleapis.com/gmail/v1/users/me/messages/155111111111?format=raw&fields=id%2ClabelIds%2CinternalDate%2Craw&alt=json returned "Quota exceeded for quota metric 'Queries' and limit 'Queries per minute per user' of service 'gmail.googleapis.com' for consumer 'project_number:81111111150'.". Details: "[{'message': "Quota exceeded for quota metric 'Queries' and limit 'Queries per minute per user' of service 'gmail.googleapis.com' for consumer 'project_number:81111111150'.", 'domain': 'usageLimits', 'reason': 'rateLimitExceeded'}]">
[...100 similar lines...]
backed up 94113 of 94113 messages
GYB needs to refresh 0 messages
$
backed up 94113 of 94113 messages
if some failed...