Skip to content

fix: keep API error output on stderr - #33

Open
fallintoplace wants to merge 1 commit into
openai:mainfrom
fallintoplace:fix/error-output-stderr
Open

fix: keep API error output on stderr#33
fallintoplace wants to merge 1 commit into
openai:mainfrom
fallintoplace:fix/error-output-stderr

Conversation

@fallintoplace

Copy link
Copy Markdown

Summary

  • write formatted API error bodies to stderr alongside the HTTP status line
  • fall back to JSON for --format-error explore, since the interactive explorer writes to stdout
  • add an end-to-end regression test that keeps stdout empty on API failures

Why

API failures currently split their output across streams: the status line goes to stderr, while the structured response body defaults to stdout. This makes failed commands unsafe to pipe because error JSON can be mistaken for successful output.

Test plan

  • ./scripts/test
  • regression test covers exit status, empty stdout, and the status plus JSON body on stderr

@fallintoplace
fallintoplace requested a review from a team as a code owner July 16, 2026 15:01
@markstuart-oai

Copy link
Copy Markdown
Contributor

@codex review

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Sep 6, 2026

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review Completed 2026-09-06T01:30:49.896521Z f14394e Manual request
🔒 Security Review Completed 2026-09-06T01:31:56.128514Z f14394e Manual request
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@chatgpt-codex-connector

Copy link
Copy Markdown

Codex Review: Didn't find any major issues. Delightful!

Reviewed commit: f14394ebe8

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

@chatgpt-codex-connector

Copy link
Copy Markdown

Security review completed. No security issues were found in this pull request.

Reviewed commit: f14394ebe8

View security finding report

Only the user who started this review can view the report in Codex.

ℹ️ About Codex security reviews in GitHub

This is an experimental Codex feature. Security reviews are triggered when:

  • You comment "@codex security review"
  • A regular code review gets triggered (for example, "@codex review" or when a PR is opened), and you’re opted in so security review runs alongside code review

Once complete, Codex will leave suggestions, or a comment if no findings are found.

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