[ Web Proxy ]
URL:
Viewing: https://cloud.google.com/workflows/docs/reference/stdlib/http/default_retry_predicate [Back]  [Original]

Function: http.default_retry_predicate  |  Workflows  |  Google Cloud Documentation Skip to main content
Google Cloud Documentation [Google Cloud Documentation]
Send feedback

Function: http.default_retry_predicate Stay organized with collections Save and categorize content based on your preferences.

Simple default retry predicate for idempotent targets.

If your target is non-idempotent, use default_retry_predicate_non_idempotent instead.

Retries on 429 (Too Many Requests), 502 (Bad Gateway), 503 (Service unavailable), and 504 (Gateway Timeout), as well as on any ConnectionError, ConnectionFailedError, and TimeoutError.

For more information, see Retry steps.

Arguments

Arguments
exception The error to apply the retry criterion upon.

Returns

true when the retry criterion is satisfied, false otherwise.

Examples

# Make an HTTP request using a standard retry predicate
# and custom maximum retries and backoff parameters
- read_item:
    try:
      call: http.get
      args:
        url: https://example.com/someapi
      result: api_response
    retry:
      predicate: ${http.default_retry_predicate}
      max_retries: 5
      backoff:
        initial_delay: 2
        max_delay: 60
        multiplier: 2
Send feedback

Except as otherwise noted, the content of this page is licensed under the Creative Commons Attribution 4.0 License, and code samples are licensed under the Apache 2.0 License. For details, see the Google Developers Site Policies. Java is a registered trademark of Oracle and/or its affiliates.

Last updated 2026-08-11 UTC.

Need to tell us more? [[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Hard to understand","hardToUnderstand","thumb-down"],["Incorrect information or sample code","incorrectInformationOrSampleCode","thumb-down"],["Missing the information/samples I need","missingTheInformationSamplesINeed","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2026-08-11 UTC."],[],[]]

Web Proxy Viewer  |  New URL  |  Original Page