Skip to content

Commit

Permalink
Change retry error from RuntimeError to FlyteRecoverableException
Browse files Browse the repository at this point in the history
  • Loading branch information
Daniel Sola authored and Daniel Sola committed Mar 27, 2024
1 parent c81133b commit 471c8f1
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions docs/flyte_fundamentals/optimizing_tasks.md
Original file line number Diff line number Diff line change
Expand Up @@ -66,12 +66,13 @@ import random
@task(retries=3)
def compute_mean(data: List[float]) -> float:
if random() < 0.05:
raise RuntimeError("Something bad happened 🔥")
raise FlyteRecoverableException("Something bad happened 🔥")
return sum(data) / len(data)
```

```{note}
Retries only take effect when running a task on a Flyte cluster.
Retries only take effect when running a task on a Flyte cluster.
See {ref}`Fault Tolerance <fault-tolerance>` for details on the types of errors that will be retried.
```

## Timeouts
Expand Down

0 comments on commit 471c8f1

Please sign in to comment.