fix: pass through server-v3 operation errors

Merged
MO
8mo ago
+15-12

Summary

  • return underlying operation error messages from server-v3 streaming handlers
  • return underlying non-AppError messages from the top-level server-v3 error wrapper
  • preserve existing status code behavior while making local act/extract/observe 500s diagnosable

Testing

  • pnpm --filter @browserbasehq/stagehand-server-v3 typecheck

Summary by cubic

Pass through underlying operation errors in @browserbasehq/stagehand-server-v3 so clients see real failure messages during streaming and top-level responses, and force flow logs on for easier debugging. Status codes stay the same, making local act/extract/observe 500s diagnosable.

  • Bug Fixes
    • Streaming + error wrapper: return the thrown error’s message for non-AppError cases; fall back to a default when not an Error, preserving status codes.
    • Observe route: remove unused Variables import/cast to satisfy lint; no behavior change.