HTTP Retry

Overview

Use this policy to set up retry logic for requests made to your Proxy and Proxy endpoints. You can manage the user experience of your API consumers when calling endpoints outside of SnapLogic. This benefits API owners who run tests that send a high volume of requests. Instead of the Proxy endpoints rejecting the request outright when resources are unavailable, this policy will retry the API on behalf of clients.

Policy Execution Order

All the request policies run before this policy is applied.

Known Issue

  • Both the HTTP Cache Response and HTTP Retry policies do not evaluate expressions. The policy always runs regardless of input in the expression fields in the policy dialog.

  • When you use the HTTP Retry Policy with the Basic Auth policy, the request fails with an error message. This issue only applies to Proxies created after the February 2024 release. Existing Proxies are unaffected.
    Workaround: Delete the HTTP Retry Policy.

Settings

Parameter Name

Description

Default Value

Parameter Name

Description

Default Value

Label

Required. The name for the API policy.

HTTP Retry

When this policy should be applied

An expression enabled field that determines the condition to be fulfilled for the API policy to execute.

For example, if the value in this field is request.method == "POST", the API policy is executed only if the request method is a POST.

N/A

Retry Condition

Select one of the following retry conditions:

  • All Errors: Retries on all types of errors.

  • Connection Errors and Auth Errors (401/403/407/511): Retries on connectivity and authorization errors.

  • Connection Errors and Client Errors (4xx): Retries on connection errors on the client side.

  • Connection Errors and Server Errors (5xx): Retries on connection errors on the server side.

All Errors

Maximum Attempts

Enter the number of attempts to retry as an integer.

Maximum: 10.

3

Retry Interval (seconds)

Enter the number of seconds for the time to attempt retries as an integer.

Accepted Range: 0 - 60 seconds.

3

Retry Timeout (seconds)

Enter the number of seconds for the retry timeout.

Maximum: 300 seconds (5 minutes)

30

Automatically Retry on 429 Responses

Select to continue retries for the HTTP response code 429.

Deselected

Use Retry-After Header for 429 Responses

Select to continue retries when the Retry - After response header is present for the HTTP response code 429.

Deselected

Status

Specifies whether the API policy is enabled or disabled. 

Enabled

Â