Explorar el Código

Added error handling when an OpenAI entity does not exist

Shun Miyazawa hace 1 año
padre
commit
5bb4c60bb0
Se han modificado 1 ficheros con 1 adiciones y 0 borrados
  1. 1 0
      apps/app/src/features/openai/server/services/openai.ts

+ 1 - 0
apps/app/src/features/openai/server/services/openai.ts

@@ -189,6 +189,7 @@ class OpenaiService implements IOpenaiService {
       await threadRelation.remove();
     }
     catch (err) {
+      await openaiApiErrorHandler(err, { notFoundError: async() => { await threadRelation.remove() } });
       throw err;
     }