Skip to content

Comments

[OpenAI] Add traceback for internal server errors for HTTP inference endpoint#1026

Merged
CharlieFRuan merged 2 commits intoNovaSky-AI:mainfrom
CharlieFRuan:pr-020426-traceback-oai
Feb 5, 2026
Merged

[OpenAI] Add traceback for internal server errors for HTTP inference endpoint#1026
CharlieFRuan merged 2 commits intoNovaSky-AI:mainfrom
CharlieFRuan:pr-020426-traceback-oai

Conversation

@CharlieFRuan
Copy link
Collaborator

Before this PR, it is hard to see what the root cause of an error is when we hit an INTERNAL_SERVER_ERROR.

This PR adds Traceback. We test that the traceback is indeed there in the unit test by mocking an error.

Copy link
Contributor

@gemini-code-assist gemini-code-assist bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

This pull request aims to improve debugging by adding traceback information to internal server errors for the HTTP inference endpoint. However, it introduces a critical security vulnerability by exposing full Python tracebacks in HTTP error responses, which can leak sensitive internal server information to potential attackers. It is recommended to remove the traceback from the response while retaining server-side logging. Additionally, there are suggestions for improving code style in tests by moving an import and enhancing test assertion consistency.

@CharlieFRuan
Copy link
Collaborator Author

/gemini review

Copy link
Contributor

@gemini-code-assist gemini-code-assist bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

The pull request successfully implements server-side traceback logging for internal server errors in the HTTP inference endpoint, enhancing debugging capabilities without exposing sensitive information to clients. The added unit tests effectively validate this behavior, ensuring that tracebacks are logged internally while client-facing error messages remain clean, adhering to CWE-209. The changes are well-implemented and thoroughly tested.

@CharlieFRuan CharlieFRuan merged commit 0d65924 into NovaSky-AI:main Feb 5, 2026
3 checks passed
@CharlieFRuan CharlieFRuan deleted the pr-020426-traceback-oai branch February 5, 2026 00:52
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.

1 participant