fix: mismatch in respect status code when har-output option used#2803
Merged
Conversation
🦋 Changeset detectedLatest commit: 2f2c258 The changes in this PR will be included in the next version bump. This PR includes changesets to release 3 packages
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
Contributor
|
Contributor
Coverage Report
File Coverage
|
||||||||||||||||||||||||||||||||||||||
tatomyr
reviewed
May 11, 2026
JLekawa
reviewed
May 11, 2026
JLekawa
approved these changes
May 11, 2026
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes and found 1 potential issue.
❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.
Reviewed by Cursor Bugbot for commit b14a347. Configure here.
tatomyr
approved these changes
May 11, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.

What/Why/How?
Reference
Closes: https://github.com/Redocly/redocly/issues/23084
Testing
Screenshots (optional)
Check yourself
Security
Note
Medium Risk
Changes the
respectHAR logging fetch wrapper to stop reconstructing responses and to handle bodyless responses, which could subtly affect response streaming/consumption behavior. Covered by new tests, but touches request/response handling in a core command path.Overview
Fixes
respect --har-outputso HAR capture no longer alters the returnedResponse(preserving the originalstatus/statusTextand avoiding a status-code mismatch).Updates
withHarto read response data fromclone()s (including special-casingbody === nullfor no-content responses) and to attachharEntrydirectly to the original response. Adds new unit tests covering status preservation and 204/no-body behavior, and includes a patch changeset for@redocly/cli.Reviewed by Cursor Bugbot for commit 2f2c258. Bugbot is set up for automated code reviews on this repo. Configure here.