mirror of
https://github.com/danny-avila/LibreChat.git
synced 2025-12-17 08:50:15 +01:00
feat: return error as a error message, not only text
This commit is contained in:
parent
7168498543
commit
d73375958b
5 changed files with 30 additions and 25 deletions
|
|
@ -1,5 +1,5 @@
|
|||
const handleError = (res, errorMessage) => {
|
||||
res.status(500).write(`event: error\ndata: ${errorMessage}`);
|
||||
const handleError = (res, message) => {
|
||||
res.write(`event: error\ndata: ${JSON.stringify(message)}\n\n`);
|
||||
res.end();
|
||||
};
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue