Skip to content

fix(playground): show script errors in the response pane and fix path.resolve for relative paths - #68

Merged
arpit-bruno merged 2 commits into
usebruno:release/v0.3.0from
sundram-bruno:fix/playground-script-errors
Sep 4, 2026
Merged

fix(playground): show script errors in the response pane and fix path.resolve for relative paths#68
arpit-bruno merged 2 commits into
usebruno:release/v0.3.0from
sundram-bruno:fix/playground-script-errors

Conversation

@sundram-bruno

@sundram-bruno sundram-bruno commented Sep 4, 2026

Copy link
Copy Markdown
Contributor

Jira: BRU-3838

Description

When a post-response or tests script failed in the docs playground, the error was only written to the browser console. The response showed 200 OK and the Tests tab said "No tests or assertions were run", so the reader had no way to know the script had failed. The Bruno app shows these errors in the response pane.

Separately, path.resolve with relative arguments threw 'process' is not defined in the playground sandbox.

Solution

Post-response and tests script errors are now shown the same way as in the Bruno app: a dismissable error card in the Response and Tests tabs, and a failed "Test Script Error" or "Post-Response Script Error" row in the test results. Tests that passed before the script failed are kept. Pre-request script errors use the same "Pre-Request Script Error" title.

path.resolve and path.relative now treat / as the working directory, so relative arguments resolve instead of throwing.

image image image

@sundram-bruno
sundram-bruno changed the base branch from main to release/v0.3.0 September 4, 2026 11:47
@arpit-bruno
arpit-bruno merged commit 53f2304 into usebruno:release/v0.3.0 Sep 4, 2026
2 checks passed
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