Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Bug] Parameter/message body error directly returns 500 #3805

Open
5 tasks done
kebe7jun opened this issue Feb 24, 2025 · 2 comments · May be fixed by #3875
Open
5 tasks done

[Bug] Parameter/message body error directly returns 500 #3805

kebe7jun opened this issue Feb 24, 2025 · 2 comments · May be fixed by #3875
Assignees

Comments

@kebe7jun
Copy link
Contributor

Checklist

  • 1. I have searched related issues but cannot get the expected help.
  • 2. The bug has not been fixed in the latest version.
  • 3. Please note that if the bug-related issue you submitted lacks corresponding environment info and a minimal reproducible demo, it will be challenging for us to reproduce and resolve the issue, reducing the likelihood of receiving feedback.
  • 4. If the issue you raised is not a bug but a question, please raise a discussion at https://github.com/sgl-project/sglang/discussions/new/choose Otherwise, it will be closed.
  • 5. Please use English, otherwise it will be closed.

Describe the bug

When my request body is illegal json, it directly returns a 500 error, not a JSON structure.

root@kebe-dev:~# curl 127.0.0.1:30000/v1/chat/completions  -H "Content-Type: application/json"     -d '{"model": "model", "messages": [{"role": "user", "content": "13x^2 + 5x - 102 = 0, x = ? "}],"temperature": 0.7, "stream": true, x}'  // x is invalid
Internal Server Error

Reproduction

root@kebe-dev:~# curl 127.0.0.1:30000/v1/chat/completions  -H "Content-Type: application/json"     -d '{"model": "model", "messages": [{"role": "user", "content": "13x^2 + 5x - 102 = 0, x = ? "}],"temperature": 0.7, "stream": true, x}'  // x is invalid
Internal Server Error

Environment

N/A

@kebe7jun
Copy link
Contributor Author

If needed, I can implement this part of the capability. : )

@jhinpan jhinpan self-assigned this Feb 24, 2025
@jhinpan
Copy link
Collaborator

jhinpan commented Feb 24, 2025

Yeah that would be great if you can help with that!

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 a pull request may close this issue.

2 participants