Skip to content

Commit

Permalink
fix: mj 错误处理
Browse files Browse the repository at this point in the history
  • Loading branch information
xyfacai committed Jan 14, 2024
1 parent e688e41 commit d3e070d
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
2 changes: 1 addition & 1 deletion controller/midjourney.go
Original file line number Diff line number Diff line change
Expand Up @@ -234,7 +234,7 @@ func UpdateMidjourneyTaskBulk() {
var responseItems []Midjourney
err = json.Unmarshal(responseBody, &responseItems)
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
}
resp.Body.Close()
Expand Down
1 change: 1 addition & 0 deletions controller/relay-mj.go
Original file line number Diff line number Diff line change
Expand Up @@ -78,6 +78,7 @@ func RelayMidjourneyImage(c *gin.Context) {
c.JSON(http.StatusInternalServerError, gin.H{
"error": "http_get_image_failed",
})
return
}
defer resp.Body.Close()
if resp.StatusCode != http.StatusOK {
Expand Down

0 comments on commit d3e070d

Please sign in to comment.