more verbose error response
All checks were successful
Deploy with Docker Compose / deploy (push) Successful in 3m17s

This commit is contained in:
2026-03-04 16:10:52 +00:00
parent 190bc6076b
commit e43c07b30a

View File

@@ -113,12 +113,18 @@ No text, no markdown, no explanation. Just the JSON object.`),
})
if err != nil {
ctx.JSON(http.StatusInternalServerError, gin.H{"error": "failed to analyze image"})
ctx.JSON(http.StatusInternalServerError, gin.H{
"raw": message.Content[0].Text,
"error": err.Error(),
})
return
}
if len(message.Content) == 0 {
ctx.JSON(http.StatusInternalServerError, gin.H{"error": "empty response from Claude"})
ctx.JSON(http.StatusInternalServerError, gin.H{
"raw": message.Content[0].Text,
"error": "empty response from Claude",
})
return
}