Skip to content

Bug/dg 314 show nicer errors webrtc#2103

Draft
rafel-roboflow wants to merge 5 commits intomainfrom
bug/dg-314-show-nicer-errors-webrtc
Draft

Bug/dg 314 show nicer errors webrtc#2103
rafel-roboflow wants to merge 5 commits intomainfrom
bug/dg-314-show-nicer-errors-webrtc

Conversation

@rafel-roboflow
Copy link
Contributor

What does this PR do?

Related Issue(s):

Type of Change

  • Bug fix (non-breaking change that fixes an issue)
  • New feature (non-breaking change that adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • Documentation update
  • Refactoring (no functional changes)
  • Other:

Testing

  • I have tested this change locally
  • I have added/updated tests for this change

Test details:

Checklist

  • My code follows the style guidelines of this project
  • I have performed a self-review of my own code
  • I have commented my code where necessary, particularly in hard-to-understand areas
  • My changes generate no new warnings or errors
  • I have updated the documentation accordingly (if applicable)

Additional Context

Preserve inner_error_type and blocks_errors when serializing exceptions
across the WebRTC worker process boundary, enabling detailed error
display in the frontend.
…de snippets

- Add BlockTraceback model with traceback, error_line, and code_snippet fields
- Create PythonBlockError class to capture structured error context
- Generate clean tracebacks showing only user code with adjusted line numbers
- Extract code snippets around error line with >>> markers
- Filter out internal workflow engine frames from traceback display
- Update WorkflowBlockError and StepExecutionError to use block_traceback field
…nses

- Add PythonBlockError for both syntax and runtime errors in Python blocks (before it was a DynamicBlockError)
- Add PythonBlockError handler in error_handlers.py returning WorkflowErrorResponse
  with blocks_errors for consistent frontend display; unified all cases i found.
- Capture stdout/stderr for both local and Modal Python block execution

Syntax errors (1 = 1), import errors, and runtime errors (1 / 0) now show consistently
in the frontend with code snippets and structured block error details.
…layering

- Fix inconsistent property_name
- Move PythonBlockError to errors.py
- Clean up inconsistencies
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.

1 participant