-
Notifications
You must be signed in to change notification settings - Fork 0
Closed
Labels
area:runtime-nodeArea: Node runtime bridgeArea: Node runtime bridgebugSomething isn't workingSomething isn't workingpriority:p3Priority P3 (low)Priority P3 (low)
Milestone
Description
Summary
When the Python bridge returns an error payload with type: "ProtocolError", NodeBridge/OptimizedNodeBridge wraps it as BridgeExecutionError. This misclassifies protocol violations as execution errors and makes it harder to differentiate user-code failures from protocol issues.
Failure mode
- Python bridge returns
{ error: { type: "ProtocolError", message: "..." } }. - JS side throws
BridgeExecutionErrorinstead ofBridgeProtocolError.
Evidence
src/runtime/node.tserrorFromalways returnsBridgeExecutionError.src/runtime/optimized-node.tserrorFromsame pattern.
Proposed fix
- If
err.type === 'ProtocolError', returnBridgeProtocolError(and include message/traceback). - Otherwise keep
BridgeExecutionError.
Acceptance criteria
- ProtocolError from Python surfaces as
BridgeProtocolErroron the JS side. - Tests cover a custom bridge returning ProtocolError.
Metadata
Metadata
Assignees
Labels
area:runtime-nodeArea: Node runtime bridgeArea: Node runtime bridgebugSomething isn't workingSomething isn't workingpriority:p3Priority P3 (low)Priority P3 (low)