<@ULVA73B9P> What is the default HTTP codes @task ...
# ask-marvin
m
@Marvin What is the default HTTP codes @task retries on
m
thought for 144.4 seconds
Short answer: none. In Prefect 3.x,
@task
does not have a default “retry on specific HTTP status codes.” If you set
retries>0
and don’t provide a
retry_condition_fn
, the task will retry on any exception (or Failed state), regardless of HTTP status. If you want to retry only for certain HTTP codes, supply a
retry_condition_fn
that inspects the exception (e.g.,
httpx.HTTPStatusError
) and returns True/False accordingly. Docs: - Retries guide - Task API reference