refactor: use Zod validation for executionError getter

- Export zExecutionErrorWsMessage schema from apiSchema
- Use safeParse instead of type casts in TaskItemImpl.executionError
- Add logging on validation failure for debugging
- Keep errorMessage extraction in useJobErrorReporting via the getter

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
Richard Yu
2026-01-12 18:46:26 -08:00
parent 400249cb08
commit 7ef92b0411
2 changed files with 3 additions and 59 deletions

View File

@@ -322,14 +322,6 @@ export class TaskItemImpl {
return this.status?.messages || []
}
/**
* Extracts the execution error message from status messages.
* Used by error reporting UI components.
*/
get errorMessage(): string | undefined {
return this.executionError?.exception_message
}
/**
* Extracts the full execution error from status messages.
* Returns the ExecutionErrorWsMessage for detailed error dialogs.