As per Resolve a 500 error: Backend error:
A
backendError
occurs when an unexpected error arises while processing the request.To fix this error, retry failed requests.
To Retry failed requests to resolve errors:
You can periodically retry a failed request over an increasing amount of time to handle errors related to rate limits, network volume, or response time. For example, you might retry a failed request after one second, then after two seconds, and then after four seconds. This method is called exponential backoff and it is used to improve bandwidth usage and maximize throughput of requests in concurrent environments.
Start retry periods at least one second after the error.
@Phil's comment is correct that the error
is on the
side of Google
. If you already did what was previously mentioned and it's still not working, it's time to reach out to their support channels
.
I recommend that you submit a bug report to let Google know about the unusual behavior that the code does not work
on the original account
when there's an attachment but works perfectly fine without an attachment
and works perfectly fine with another email address with or without attachments
since I haven't found a report when I searched the Google Issue Tracker.
You may Find support for the Gmail API directly on Developer product feedback
and through Contact Google Workspace support
.