mirror of
https://github.com/linux-do/new-api.git
synced 2025-09-18 00:16:37 +08:00
fix: mj 错误处理
This commit is contained in:
parent
e688e41360
commit
d3e070d963
@ -234,7 +234,7 @@ func UpdateMidjourneyTaskBulk() {
|
|||||||
var responseItems []Midjourney
|
var responseItems []Midjourney
|
||||||
err = json.Unmarshal(responseBody, &responseItems)
|
err = json.Unmarshal(responseBody, &responseItems)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
common.LogError(ctx, fmt.Sprintf("Get Task parse body error2: %v", err))
|
common.LogError(ctx, fmt.Sprintf("Get Task parse body error2: %v, body: %s", err, string(responseBody)))
|
||||||
continue
|
continue
|
||||||
}
|
}
|
||||||
resp.Body.Close()
|
resp.Body.Close()
|
||||||
|
@ -78,6 +78,7 @@ func RelayMidjourneyImage(c *gin.Context) {
|
|||||||
c.JSON(http.StatusInternalServerError, gin.H{
|
c.JSON(http.StatusInternalServerError, gin.H{
|
||||||
"error": "http_get_image_failed",
|
"error": "http_get_image_failed",
|
||||||
})
|
})
|
||||||
|
return
|
||||||
}
|
}
|
||||||
defer resp.Body.Close()
|
defer resp.Body.Close()
|
||||||
if resp.StatusCode != http.StatusOK {
|
if resp.StatusCode != http.StatusOK {
|
||||||
|
Loading…
Reference in New Issue
Block a user