Se você receber um erro de API e quiser repetir a chamada, execute a tentativa com intervalos exponenciais e aleatoriedade. Use os seguintes intervalos mínimos de repetição para os erros indicados:
30 segundos para erros de cota 429
1 segundo para erros de cota 500
1 segundo para erros de cota 503
Para outros erros, faça tentativas com base nas informações de erro adicionais. Consulte
google.rpc.Code
para mais detalhes.
[[["Fácil de entender","easyToUnderstand","thumb-up"],["Meu problema foi resolvido","solvedMyProblem","thumb-up"],["Outro","otherUp","thumb-up"]],[["Difícil de entender","hardToUnderstand","thumb-down"],["Informações incorretas ou exemplo de código","incorrectInformationOrSampleCode","thumb-down"],["Não contém as informações/amostras de que eu preciso","missingTheInformationSamplesINeed","thumb-down"],["Problema na tradução","translationIssue","thumb-down"],["Outro","otherDown","thumb-down"]],["Última atualização 2025-08-13 UTC."],[],[],null,["# Troubleshooting\n===============\n\n### What does the \"service not enabled\" error mean?\n\nTo use any Google API service, you need to:\n\n1. Create or use an existing Google Cloud project.\n2. Enable the service for the Google Cloud project.\n3. Pass an API key or an OAuth access token associated with the Google Cloud project.\n\nTo learn more about using API keys, see\n[Authentication Overview](/docs/authentication). To fix this error, enable the\nService Usage API for your Google Cloud project using the instructions in\n[Enabling and Disabling Services](/service-usage/docs/enable-disable).\n\n### How do I fix permission denied errors?\n\nSuch errors typically mean the caller doesn't have the right\n[Identity and Access Management](/iam) permission. See the\n[Access Control](/service-usage/docs/access-control) guide for details on how to\nfix this error.\n\n### How do I perform a retry on API errors?\n\nIf you receive an API error and want to retry the call, we recommend that you\nperform the retry with exponential intervals plus randomness. Use the following\nminimum retry intervals for the indicated errors:\n\n- 30 seconds for `429` quota errors.\n- 1 second for `500` quota errors.\n- 1 second for `503` quota errors.\n\nFor other errors, make sure you perform retries based on additional error\ninformation. See\n[`google.rpc.Code`](https://github.com/googleapis/googleapis/blob/master/google/rpc/code.proto)\nfor more details."]]