more verbose error response
All checks were successful
Deploy with Docker Compose / deploy (push) Successful in 3m17s
All checks were successful
Deploy with Docker Compose / deploy (push) Successful in 3m17s
This commit is contained in:
@@ -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
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user