Repository navigation
Preserve ConvexError data across workflow steps and replay - #316
Draft
ianmacartney wants to merge 1 commit into
Draft
ianmacartney wants to merge 1 commit into
ianmacartney wants to merge 1 commit into
Conversation
commit: |
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.
A
ConvexErrorthrown by a step currently reaches the workflow as a plainError, soinstanceof ConvexErroris false and.datais lost. Preserve structured error data for inline steps and workflow-handler failures, then reconstructConvexErrorwhen replaying failed steps. Queued queries, mutations, and actions use the corresponding Workpool transport change. Nested workflows preserve the same payload through completion callbacks.Fixes #315.
Ordinary errors keep their recorded messages, and historical failures without structured data remain ordinary errors. Tests cover all five function execution modes, recovery after replay, nested workflows, falsy error data, bigint and byte payloads, and ordinary-error compatibility.
Dependency: convex/workpool#257. This draft pins its immutable commit build for development and CI. Before merging, release that Workpool change and replace the development pin with the released version. The peer minimum anticipates
0.4.16; adjust it to the actual release if needed.Validation:
npm ci, build, all 143 tests, typecheck, and formatting pass. Lint has no errors and three existing filter warnings.origin/main, even with the Workpool transport change installed.Related investigation: merged #218 (
ian/error-line-numbers) improves stack reporting but does not preserve error data. No existing implementation was found in the local branches or PR search.