Skip to content

fix: fall back to top-level JSON error bodies#1831

Open
MukundaKatta wants to merge 1 commit intoopenai:masterfrom
MukundaKatta:codex/openai-node-error-body-fallback
Open

fix: fall back to top-level JSON error bodies#1831
MukundaKatta wants to merge 1 commit intoopenai:masterfrom
MukundaKatta:codex/openai-node-error-body-fallback

Conversation

@MukundaKatta
Copy link
Copy Markdown

Summary

  • keep preferring the standard top-level error field when present
  • fall back to the full parsed JSON body for compatible APIs that return error details in other keys like detail

Testing

  • not run locally (fresh clone without built dist artifacts)

Closes #1734

@MukundaKatta MukundaKatta requested a review from a team as a code owner April 19, 2026 18:25
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.

The node.js client only reads errors from the "error" field of a response, with no fallback if it doesn't exist

1 participant