I’ve been getting the same error for days now, and even after waiting as specified, the request fails. It doesn’t show any sign of exceeding the quota in Google Cloud Console, either.
GaxiosError: User-rate limit exceeded. Retry after 2024-06-20T19:51:37.198Z
at Gaxios._request (/Users/gsquare567/Sites/test/node_modules/gaxios/src/gaxios.ts:146:15)
at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
at async OAuth2Client.requestAsync (/Users/gsquare567/Sites/test/node_modules/google-auth-library/build/src/auth/oauth2client.js:408:18)
at loadEmail (/Users/gsquare567/Sites/test/server/utils/gmail.ts:763:30)
at runOperation (/Users/gsquare567/Sites/test/server/utils/google.ts:254:20)
at runGmailOperation (/Users/gsquare567/Sites/test/server/utils/gmail.ts:184:5)
at main (/Users/gsquare567/Sites/test/server/scripts/write-email-test.ts:13:27)
at <anonymous> (/Users/gsquare567/Sites/test/server/scripts/write-email-test.ts:38:3) {
config: {
url: 'https://gmail.googleapis.com/gmail/v1/users/me/messages/1902cf0fc5523629',
method: 'GET',
apiVersion: '',
userAgentDirectives: [
{
product: 'google-api-nodejs-client',
version: '7.2.0',
comment: 'gzip'
}
],
paramsSerializer: [Function (anonymous)],
headers: {
'x-goog-api-client': 'gdcl/7.2.0 gl-node/20.14.0',
'Accept-Encoding': 'gzip',
'User-Agent': 'google-api-nodejs-client/7.2.0 (gzip)',
Authorization: '<<REDACTED> - See `errorRedactor` option in `gaxios` for configuration>.'
},
params: {},
validateStatus: [Function (anonymous)],
retry: true,
responseType: 'unknown',
errorRedactor: [Function: defaultErrorRedactor],
retryConfig: {
currentRetryAttempt: 3,
retry: 3,
httpMethodsToRetry: [ 'GET', 'HEAD', 'PUT', 'OPTIONS', 'DELETE' ],
noResponseRetries: 2,
statusCodesToRetry: [ [ 100, 199 ], [ 408, 408 ], [ 429, 429 ], [ 500, 599 ] ]
}
},
response: {
config: {
url: 'https://gmail.googleapis.com/gmail/v1/users/me/messages/1902cf0fc5523629',
method: 'GET',
apiVersion: '',
userAgentDirectives: [
{
product: 'google-api-nodejs-client',
version: '7.2.0',
comment: 'gzip'
}
],
paramsSerializer: [Function (anonymous)],
headers: {
'x-goog-api-client': 'gdcl/7.2.0 gl-node/20.14.0',
'Accept-Encoding': 'gzip',
'User-Agent': 'google-api-nodejs-client/7.2.0 (gzip)',
Authorization: '<<REDACTED> - See `errorRedactor` option in `gaxios` for configuration>.'
},
params: {},
validateStatus: [Function (anonymous)],
retry: true,
responseType: 'unknown',
errorRedactor: [Function: defaultErrorRedactor],
retryConfig: {
currentRetryAttempt: 3,
retry: 3,
httpMethodsToRetry: [ 'GET', 'HEAD', 'PUT', 'OPTIONS', 'DELETE' ],
noResponseRetries: 2,
statusCodesToRetry: [ [ 100, 199 ], [ 408, 408 ], [ 429, 429 ], [ 500, 599 ] ]
}
},
data: {
error: {
code: 429,
message: 'User-rate limit exceeded. Retry after 2024-06-20T19:51:37.198Z',
errors: [
{
message: 'User-rate limit exceeded. Retry after 2024-06-20T19:51:37.198Z',
domain: 'global',
reason: 'rateLimitExceeded'
}
],
status: 'RESOURCE_EXHAUSTED'
}
},
headers: {
'alt-svc': 'h3=":443"; ma=2592000,h3-29=":443"; ma=2592000',
'cache-control': 'private',
'content-encoding': 'gzip',
'content-type': 'application/json; charset=UTF-8',
date: 'Thu, 20 Jun 2024 19:39:58 GMT',
server: 'ESF',
'transfer-encoding': 'chunked',
vary: 'Origin, X-Origin, Referer',
'x-content-type-options': 'nosniff',
'x-frame-options': 'SAMEORIGIN',
'x-xss-protection': '0'
},
status: 429,
statusText: 'Too Many Requests',
request: {
responseURL: 'https://gmail.googleapis.com/gmail/v1/users/me/messages/1902cf0fc5523629'
}
},
error: undefined,
status: 429,
code: 429,
errors: [
{
message: 'User-rate limit exceeded. Retry after 2024-06-20T19:51:37.198Z',
domain: 'global',
reason: 'rateLimitExceeded'
}
],
[Symbol(gaxios-gaxios-error)]: '6.6.0'
}