refac: error handling

This commit is contained in:
Timothy Jaeryang Baek
2025-03-28 00:52:13 -07:00
parent 2fc8ace46d
commit 5656f030c4
4 changed files with 32 additions and 9 deletions

View File

@@ -1639,10 +1639,12 @@
return null;
});
console.log(res);
if (res) {
taskId = res.task_id;
if (res.error) {
await handleOpenAIError(res.error, responseMessage);
} else {
taskId = res.task_id;
}
}
await tick();