Skip to content

Conversation

@jsundai jsundai requested a review from a team as a code owner December 3, 2025 21:03
@vercel
Copy link

vercel bot commented Dec 3, 2025

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Preview Comments Updated (UTC)
temporal-documentation Ready Ready Preview Comment Dec 3, 2025 9:03pm

@github-actions
Copy link
Contributor

github-actions bot commented Dec 3, 2025

📖 Docs PR preview links

@jsundai jsundai changed the title Non retryable errors course port Non retryable errors for activities course port Dec 3, 2025
In most cases, we recommend using the Workflow Execution Timeout for [Workflows](/workflows) or the Schedule-To-Close Timeout for Activities to limit the total duration of retries, rather than using this attribute.

### Non-Retryable Errors
### Non-Retryable Errors {#non-retryable-errors}
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just something I've been wondering about. Why do we do the {#....} on some of the headings?

By default, none are specified.
Errors are matched against the `type` field of the [Application Failure](/references/failures#application-failure).
If one of those errors occurs, a retry does not occur.
If you know of errors that should not trigger a retry, you can specify that, if they occur, the execution is not retried.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
If you know of errors that should not trigger a retry, you can specify that, if they occur, the execution is not retried.
If you know of errors that should not trigger a retry, you can specify that and if they occur, the execution is not retried.


To raise a non-retryable error, specify the `non_retryable` flag when raising an `ApplicationError`:

```python
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The spacing looks a little off here. I think if you remove the spaces to the left, it'll line up with the code block.
Screenshot 2025-12-04 at 15 32 09


To throw a non-retryable error, use the `newNonRetryableFailure` method:

```java
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The spacing looks a little off here. I think if you remove the spaces to the left, it'll line up with the code block.
Screenshot 2025-12-04 at 15 33 26

throw new ApplicationFailureException(
$"Something bad happened on attempt {attempt}",
errorType: "my_failure_type",
nonRetryable: true);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
nonRetryable: true);
nonRetryable: true
);

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just a suggestion to make that closing parentheses clearer.
Screenshot 2025-12-04 at 15 34 09

---

import { CaptionedImage, RelatedReadContainer, RelatedReadItem } from '@site/src/components';
import Tabs from '@theme/Tabs';
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just a question, but why are we using the <Tabs> instead of the <SdkTabs>?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants