Skip to content

HTTP 400 / preconditionFailed should be retried #2723

@ttung

Description

@ttung

Environment details

  • OS type and version: MacOS 26
  • Python version: Python 3.12.11
  • pip version: uv
  • google-api-python-client version: n/a

Steps to reproduce

Intermittent HTTP 400 / preconditionFailed on Gmail API. A casual web search suggests that other Google APIs also issue preconditionFailed. At least in my use case, retrying with exponential backoff always works. I cannot assert that in all use cases that this is the correct behavior.

Code example

N/A

Stack trace

Metadata

Metadata

Labels

priority: p2Moderately-important priority. Fix may not be included in next release.priority: p3Desirable enhancement or fix. May not be included in next release.type: bugError or flaw in code with unintended results or allowing sub-optimal usage patterns.

Type

No type
No fields configured for issues without a type.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions