Skip to content

Commit cf23087

Browse files
committed
.
1 parent 7e9f7c2 commit cf23087

File tree

1 file changed

+18
-0
lines changed

1 file changed

+18
-0
lines changed

docs/content/docs/api-reference/workflow/retryable-error.mdx

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -94,3 +94,21 @@ async function retryStep() {
9494
})
9595
}
9696
```
97+
98+
Or retry at a specific date and time:
99+
100+
```typescript lineNumbers
101+
import { RetryableError } from "workflow"
102+
103+
async function retryableWorkflow() {
104+
"use workflow"
105+
await retryStep();
106+
}
107+
108+
async function retryStep() {
109+
"use step"
110+
throw new RetryableError("Retryable!", {
111+
retryAfter: new Date(Date.now() + 60000) // - retry after 1 minute // [!code highlight]
112+
})
113+
}
114+
```

0 commit comments

Comments
 (0)