Console log anthropic multimodal caption errors

This commit is contained in:
Cohee 2024-06-15 15:55:02 +03:00
parent 1ac2241d2c
commit 2ea0d6466c
1 changed files with 2 additions and 1 deletions

View File

@ -45,7 +45,8 @@ router.post('/caption-image', jsonParser, async (request, response) => {
});
if (!result.ok) {
console.log(`Claude API returned error: ${result.status} ${result.statusText}`);
const text = await result.text();
console.log(`Claude API returned error: ${result.status} ${result.statusText}`, text);
return response.status(result.status).send({ error: true });
}