Improve createDataFileDefinition error handling#134
Conversation
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: a376c3a187
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| currentPath, | ||
| cause, | ||
| ); | ||
| onError?.(error); |
There was a problem hiding this comment.
Isolate
onError callback failures from file state updates
Calling the user-provided onError directly inside the save-error path can throw and abort the rest of this catch block, which means state.current.state never transitions to 'error' and updateDataFromState() is skipped. This turns a recoverable file write failure into an unhandled rejection path whenever a consumer’s handler throws (for example, due to logging/telemetry failures), so the hook can stop reporting its own error state reliably.
Useful? React with 👍 / 👎.
No description provided.