Skip to content

Commit 2dfe191

Browse files
committed
Fixed some docs that were missing imports
1 parent e337b21 commit 2dfe191

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

docs/v3/errors-retrying.mdx

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,8 @@ This task will retry 10 times with exponential backoff.
2929
One way to gain reliability is to break your work into smaller tasks and [trigger](/v3/triggering) them from each other. Each task can have its own retrying behavior:
3030

3131
```ts /trigger/multiple-tasks.ts
32+
import { task } from "@trigger.dev/sdk/v3";
33+
3234
export const myTask = task({
3335
id: "my-task",
3436
retry: {
@@ -66,7 +68,7 @@ We provide some useful functions that you can use to retry smaller parts of a ta
6668
You can retry a block of code that can throw an error, with the same retry settings as a task.
6769

6870
```ts /trigger/retry-on-throw.ts
69-
import { task, logger, retry } from "@trigger.dev/sdk/v3"
71+
import { task, logger, retry } from "@trigger.dev/sdk/v3";
7072

7173
export const retryOnThrow = task({
7274
id: "retry-on-throw",
@@ -102,6 +104,8 @@ You can use `fetch`, `axios`, or any other library in your code.
102104
But we do provide a convenient function to perform HTTP requests with conditional retrying based on the response:
103105

104106
```ts /trigger/retry-fetch.ts
107+
import { task, logger, retry } from "@trigger.dev/sdk/v3";
108+
105109
export const taskWithFetchRetries = task({
106110
id: "task-with-fetch-retries",
107111
run: async ({ payload, ctx }) => {
@@ -195,6 +199,8 @@ In this complicated example:
195199
- If we've run out of requests or tokens we retry at the time specified in the headers.
196200

197201
```ts
202+
import { task } from "@trigger.dev/sdk/v3";
203+
198204
export const openaiTask = task({
199205
id: "openai-task",
200206
retry: {

0 commit comments

Comments
 (0)