Spaces:
Running
Running
generic error
Browse files
server.js
CHANGED
@@ -307,12 +307,12 @@ app.post("/api/ask-ai", async (req, res) => {
|
|
307 |
// End the response stream
|
308 |
res.end();
|
309 |
} catch (error) {
|
|
|
310 |
if (!res.headersSent) {
|
311 |
res.status(500).send({
|
312 |
ok: false,
|
313 |
-
openSelectProvider: true,
|
314 |
message:
|
315 |
-
"An error occurred while processing your request. Please try again
|
316 |
});
|
317 |
} else {
|
318 |
// Otherwise end the stream
|
|
|
307 |
// End the response stream
|
308 |
res.end();
|
309 |
} catch (error) {
|
310 |
+
console.log(error);
|
311 |
if (!res.headersSent) {
|
312 |
res.status(500).send({
|
313 |
ok: false,
|
|
|
314 |
message:
|
315 |
+
"An error occurred while processing your request. Please try again later.",
|
316 |
});
|
317 |
} else {
|
318 |
// Otherwise end the stream
|