Skip to content

fix: preserve API error response bodies - #38

Merged
chaim0m merged 1 commit into
mainfrom
codex/dci-agent-error-body
Aug 4, 2026
Merged

fix: preserve API error response bodies#38
chaim0m merged 1 commit into
mainfrom
codex/dci-agent-error-body

Conversation

@chaim0m

@chaim0m chaim0m commented Aug 3, 2026

Copy link
Copy Markdown
Collaborator

Summary

  • keep the structured agent error envelope on stderr
  • pass the original HTTP error response to the configured output formatter
  • add regression coverage proving detailed API error bodies remain available

Why

Follow-up to Alfredo review comment on #32. Agent mode previously suppressed the complete API error body, so payloads such as structured validation errors could become an unrecoverable generic HTTP status message.

Test methods

go test ./...

Could this break things?

Risk: medium, intentional output correction. Agent-mode failures will now retain the API error body on stdout while the stable envelope remains on stderr. Exit codes and human-mode behavior are unchanged. Consumers that explicitly assumed stdout was empty on failures will now see the detailed response.

Jira

CMP-48643

@chaim0m
chaim0m requested a review from apgiorgi as a code owner August 3, 2026 17:06
@chaim0m
chaim0m requested a review from taltultc August 3, 2026 17:06
@chaim0m chaim0m self-assigned this Aug 4, 2026
@chaim0m
chaim0m merged commit 09f2307 into main Aug 4, 2026
6 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