Custom retry policy per error type for activity?

Hi, we are currently trying to design retry policy for our activity. The activity is calling http server and we want to retry based on the http status code.

  1. The default for 5xx, it will be retryable with shorter backoff of e.g. 2 sec as these are mostly intermittent.
  2. For 429 (rate limiter) error we want to retry with longer backoff e.g. 1 min.
  3. For 400 error, this might happen because a resource in the server are currently being ‘paused’ by human operator for maintenance. This maintenance is expected to be done < 10 mins, after which the resource is available again. We want to auto retry this request with long backoff e.g. 10 mins.
  4. Other 4xx will NOT be retryable.

Wondering if this is something that can be done with current sdk?

Thanks in advance.

Unfortunately this is not yet supported. Relevant issues:

2 Likes