Skip to content

Conversation

@ammar-agent
Copy link
Collaborator

Extract detailed Zod validation info from EVENT_ITERATOR_VALIDATION_FAILED errors instead of logging the generic 'Event iterator validation failed' message.

Changes

The new formatValidationError() helper extracts:

  • Validation issue paths and messages (up to 3)
  • Count of additional issues if more than 3
  • Event type that failed validation

Before

[WorkspaceStore] Error in onChat subscription for 6d48f6dc1c: ORPCError: Event iterator validation failed

After

[WorkspaceStore] Event validation failed for 6d48f6dc1c: type: Invalid discriminator value; metadata.usage.inputTokens: Expected number (+2 more) [event: stream-end]

Generated with mux • Model: anthropic:claude-opus-4-5 • Thinking: high

Extract detailed Zod validation info from EVENT_ITERATOR_VALIDATION_FAILED
errors instead of logging the generic 'Event iterator validation failed' message.

The new formatValidationError() helper extracts:
- Validation issue paths and messages (up to 3)
- Count of additional issues if more than 3
- Event type that failed validation

Before: 'ORPCError: Event iterator validation failed'
After: 'type: Invalid discriminator value; metadata.usage.inputTokens: Expected number [event: stream-end]'
@ammario ammario merged commit c836a85 into main Dec 21, 2025
20 checks passed
@ammario ammario deleted the error-handling-3fsx branch December 21, 2025 02:16
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.

2 participants