refac: middleware

This commit is contained in:
Timothy Jaeryang Baek
2025-02-04 21:01:53 -08:00
parent 2e61ea7cc9
commit e7da506add
3 changed files with 58 additions and 39 deletions

View File

@@ -322,7 +322,7 @@ export const generateOpenAIChatCompletion = async (
return res.json();
})
.catch((err) => {
error = `${err?.detail ?? 'Network Problem'}`;
error = `${err?.detail ?? err}`;
return null;
});