fix(anthropic.js, gptPlugins.js, openAI.js): add error handling to abortMessage function calls

This commit is contained in:
Danny Avila 2023-07-28 11:58:56 -04:00 committed by Danny Avila
parent d56817850c
commit 7b8036a369
3 changed files with 15 additions and 3 deletions

View file

@ -9,7 +9,11 @@ const requireJwtAuth = require('../../../middleware/requireJwtAuth');
const abortControllers = new Map();
router.post('/abort', requireJwtAuth, async (req, res) => {
return await abortMessage(req, res, abortControllers);
try {
return await abortMessage(req, res, abortControllers);
} catch (err) {
console.error(err);
}
});
router.post('/', requireJwtAuth, async (req, res) => {