Prevent fetch response status forwarding

Fixes #3864
This commit is contained in:
Cohee
2025-04-17 13:39:09 +00:00
parent 7b2f1f7c7a
commit dfd78077ec
4 changed files with 7 additions and 7 deletions

View File

@@ -45,7 +45,7 @@ router.post('/caption-image', async (request, response) => {
if (!result.ok) {
const error = await result.json();
console.error(`Google AI Studio API returned error: ${result.status} ${result.statusText}`, error);
return response.status(result.status).send({ error: true });
return response.status(500).send({ error: true });
}
/** @type {any} */