debug: show raw Gemini vision response in Telegram when JSON parse fails

This commit is contained in:
Lizandro
2026-07-15 17:47:07 +00:00
parent 2acb80a7d2
commit bd93ef2029
2 changed files with 20 additions and 4 deletions
+6 -1
View File
@@ -188,7 +188,12 @@ class TelegramBotService
}
if (isset($datosPago['__error'])) {
$this->send($chatId, "⚠️ Error al analizar el comprobante:\n`" . $datosPago['__error'] . "`");
$this->send($chatId, "⚠️ Error de API:\n`" . $datosPago['__error'] . "`");
return;
}
if (isset($datosPago['__parse_error'])) {
$this->send($chatId, "⚠️ Gemini respondió pero no es JSON válido:\n`" . $datosPago['__parse_error'] . "`");
return;
}