From 2ea0d6466c6c004436fe50c8ba5afa60508ca92a Mon Sep 17 00:00:00 2001 From: Cohee <18619528+Cohee1207@users.noreply.github.com> Date: Sat, 15 Jun 2024 15:55:02 +0300 Subject: [PATCH] Console log anthropic multimodal caption errors --- src/endpoints/anthropic.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/endpoints/anthropic.js b/src/endpoints/anthropic.js index 899251fde..a127706ac 100644 --- a/src/endpoints/anthropic.js +++ b/src/endpoints/anthropic.js @@ -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 }); }