Describe the bug
on UI, when I add a MCP server, and given the wrong token, it should tell user the token is invalid, but on current UI, it just says: Unexpected token 'I', "Internal S"... is not valid JSON
To Reproduce
- add an MCP server which need a token, but give the wrong token
- you can see on the top right corner: Unexpected token 'I', "Internal S"... is not valid JSON
- in the chainlit UI log, you can see
INFO:httpx:HTTP Request: POST https://example.com/mcp/server "HTTP/1.1 401 Unauthorized"
INFO: 127.0.0.1:62307 - "POST /chat/mcp HTTP/1.1" 500 Internal Server Error
***********************
| raise RuntimeError("No response returned.")
| RuntimeError: No response returned.
Expected behavior
it should tell users the clearly msg what's wrong for the MCP server
Screenshots
Desktop (please complete the following information):
- OS: [iOS]
- Browser [chrome]
- Version [all]