Skip to content

fix: preserve HTTP status for unexpected run error bodies - #1287

Merged
unhappychoice merged 2 commits into
masterfrom
factory/implement-3d86d64f
Nov 21, 2026
Merged

unhappychoice merged 2 commits into
masterfrom
factory/implement-3d86d64f

Conversation

@unhappychoice

Copy link
Copy Markdown
Member

Check that the nested error value is an object before reading its fields. Use the first non-blank string from detail or title, and fall back to the HTTP status when neither is usable.

Add regression tests for a string-valued error on HTTP 502 and for an empty detail with a usable title. The 502 regression checks the exact stderr output and a nonzero exit status. Both tests failed against the original implementation and passed with the fix.

Verified with bundle exec rubocop lib on Ruby 3.4.13 and COVERAGE=true bundle exec rspec on Ruby 3.4.13 and 3.3.14. All 339 examples passed on both versions.

Closes #1269

🤖 Opened by factory

@unhappychoice unhappychoice added factory:change A pull request opened by the factory factory:merge factory:needs-decision Waiting for a human decision factory:fix and removed factory:merge factory:needs-decision Waiting for a human decision labels Nov 21, 2026
…-request-a2fafb55

# Conflicts:
#	lib/circleci/cli/command/run_command.rb
@unhappychoice
unhappychoice merged commit 4814b29 into master Nov 21, 2026
6 checks passed
@unhappychoice
unhappychoice deleted the factory/implement-3d86d64f branch November 21, 2026 06:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

factory:change A pull request opened by the factory factory:merge

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Preserve the HTTP status for unexpected run error bodies

1 participant