fix(core): retry TASK_MIDDLEWARE_ERROR under the task's retry policy#11
Open
deepshekhardas wants to merge 1 commit into
Open
fix(core): retry TASK_MIDDLEWARE_ERROR under the task's retry policy#11deepshekhardas wants to merge 1 commit into
deepshekhardas wants to merge 1 commit into
Conversation
There was a problem hiding this comment.
1 issue found across 3 files
Prompt for AI agents (unresolved issues)
Check if these issues are valid — if so, understand the root cause of each and fix them. If appropriate, use sub-agents to investigate and fix each issue separately.
<file name="packages/core/src/v3/errors.ts">
<violation number="1" location="packages/core/src/v3/errors.ts:647">
P2: User-facing error text contains a garbled replacement character (`�`), which degrades message readability.</violation>
</file>
Reply with feedback, questions, or to request a fix.
Re-trigger cubic
| `over the realtime stream's per-record cap of ${maxSize} bytes. ` + | ||
| `For oversized payloads (e.g. large tool outputs), write the value to your own store and ` + | ||
| `emit only an id/url through the chat stream — see https://trigger.dev/docs/ai-chat/patterns/large-payloads.` | ||
| `emit only an id/url through the chat stream � see https://trigger.dev/docs/ai-chat/patterns/large-payloads.` |
There was a problem hiding this comment.
P2: User-facing error text contains a garbled replacement character (�), which degrades message readability.
Prompt for AI agents
Check if this issue is valid — if so, understand the root cause and fix it. At packages/core/src/v3/errors.ts, line 647:
<comment>User-facing error text contains a garbled replacement character (`�`), which degrades message readability.</comment>
<file context>
@@ -641,7 +644,7 @@ export class ChatChunkTooLargeError extends Error {
`over the realtime stream's per-record cap of ${maxSize} bytes. ` +
`For oversized payloads (e.g. large tool outputs), write the value to your own store and ` +
- `emit only an id/url through the chat stream — see https://trigger.dev/docs/ai-chat/patterns/large-payloads.`
+ `emit only an id/url through the chat stream � see https://trigger.dev/docs/ai-chat/patterns/large-payloads.`
);
this.name = "ChatChunkTooLargeError";
</file context>
Suggested change
| `emit only an id/url through the chat stream � see https://trigger.dev/docs/ai-chat/patterns/large-payloads.` | |
| `emit only an id/url through the chat stream — see https://trigger.dev/docs/ai-chat/patterns/large-payloads.` |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Adds TASK_MIDDLEWARE_ERROR to shouldLookupRetrySettings so it is retried under the task's retry policy instead of failing the run on the first attempt.
The error was already classified as retryable by shouldRetryError, but shouldLookupRetrySettings did not include it, so the retry flow fell through to fail_run.
Closes triggerdotdev#3676
Summary by cubic
Retries
TASK_MIDDLEWARE_ERRORunder the task's retry policy in@trigger.dev/core, preventing runs from failing on the first attempt. Aligns shouldLookupRetrySettings with shouldRetryError so middleware errors follow task backoff.TASK_MIDDLEWARE_ERRORin shouldLookupRetrySettings to use task retry/backoff.Written for commit ab651f8. Summary will update on new commits. Review in cubic