Skip to content

fix: prevent response truncation in recursive collection runner#6862

Merged
sid-bruno merged 1 commit intousebruno:mainfrom
gopu-bruno:fix/runner-response-truncation-6828
Jan 21, 2026
Merged

fix: prevent response truncation in recursive collection runner#6862
sid-bruno merged 1 commit intousebruno:mainfrom
gopu-bruno:fix/runner-response-truncation-6828

Conversation

@gopu-bruno
Copy link
Collaborator

@gopu-bruno gopu-bruno commented Jan 20, 2026

Description

Resolves response body truncation when executing collections recursively via the UI.

Fixes: #6828

Problem

When executing a collection recursively via the UI, requests returning 4xx/5xx status codes had their response body prematurely truncated. This resulted in assertion failures due to malformed JSON in the response.

The issue was not reproducible when:

  • Executing individual requests in the UI
  • Running collections via the CLI

Fix

Updated the collection runner to consume the complete response stream for error cases, consistent with the existing behavior for successful responses.

Contribution Checklist:

  • I've used AI significantly to create this pull request
  • The pull request only addresses one issue or adds one feature.
  • The pull request does not introduce any breaking changes
  • I have added screenshots or gifs to help explain the change if applicable.
  • I have read the contribution guidelines.
  • Create an issue and link to the pull request.

Note: Keeping the PR small and focused helps make it easier to review and merge. If you have multiple changes you want to make, please consider submitting them as separate pull requests.

Publishing to New Package Managers

Please see here for more information.

Summary by CodeRabbit

  • Bug Fixes
    • Improved HTTP error response handling to ensure complete error data is properly captured and processed for more accurate error reporting.

✏️ Tip: You can customize this high-level summary in your review settings.

@coderabbitai
Copy link
Contributor

coderabbitai bot commented Jan 20, 2026

Walkthrough

Single line modification in the error handling path for HTTP responses: changed the closeOnFirst flag from true to false in the promisifyStream call, allowing error response data to accumulate fully before stream closure instead of terminating on the first data chunk.

Changes

Cohort / File(s) Summary
HTTP Error Response Handling
packages/bruno-electron/src/ipc/network/index.js
Modified promisifyStream configuration to read complete error responses by setting closeOnFirst to false, preventing premature stream closure that was truncating response data

Estimated code review effort

🎯 1 (Trivial) | ⏱️ ~3 minutes

Suggested labels

size/S

Suggested reviewers

  • helloanoop
  • lohit-bruno
  • naman-bruno
  • bijin-bruno

Poem

🌊 A stream once closed too soon,
Truncating responses beneath the moon,
Now it reads complete, end to end,
On error responses, we can depend! ✨

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title accurately describes the main fix: preventing response truncation in recursive collection runner, which directly addresses the core issue.
Linked Issues check ✅ Passed The change aligns with issue #6828 requirements: modifying error response stream handling from closeOnFirst=true to closeOnFirst=false ensures complete response bodies are consumed for error cases.
Out of Scope Changes check ✅ Passed The modification is narrowly scoped to the error handling path in network/index.js, directly addressing the truncation issue without introducing unrelated changes.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing touches
  • 📝 Generate docstrings

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

UI Recursive Test Runner truncates API response causing assert block failures

2 participants