Retry
Retries backend requests after transient failures.
Use the Retry policy to automatically retry failed backend requests when transient errors occur, improving reliability and resilience.
For more information on the policy parameter descriptions, see DataPower Nano Gateway documentation.
Example of a Retry policy in code view.
kind: Retry
apiVersion: api.ibm.com/v1
metadata:
name: retry-policy
namespace: sample
version: '1.0'
spec:
delay: 2000
retryOn:
- "BadRequestError"
- "CacheUnmetInputs"
- "CacheUnmetOutputs"
- "ConnectionError"
- "CorsRejectError"
- "CustomError"
- "ForbiddenError"
- "InternalError"
- "JsonataError"
- "JsonataNoMatchError"
- "LimitExceededError"
- "LuaScriptError"
- "MethodNotAllowedError"
- "NotFoundError"
- "NotImplementedError"
- "RedirectsExceeded"
- "ParseError"
- "TimeoutError"
- "SqlInjectionFilterError"
- "UnauthorizedError"
- "ValidateError"
execute:
- $ref: sample:set-custom-response:1.0
maxRetries: 3