Skip to content
This repository has been archived by the owner on Mar 20, 2024. It is now read-only.

Commit

Permalink
log 403 error with invalid arkose token
Browse files Browse the repository at this point in the history
  • Loading branch information
linweiyuan committed Jul 21, 2023
1 parent 51ac5db commit ec738dc
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions api/chatgpt/api.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ import (
"bufio"
"bytes"
"encoding/json"
"io"
"os"
"strings"
"time"
Expand Down Expand Up @@ -124,6 +125,9 @@ func sendConversationRequest(c *gin.Context, request CreateConversationRequest)
return nil, true
}

data, _ := io.ReadAll(resp.Body)
logger.Warn(string(data))

responseMap := make(map[string]interface{})
json.NewDecoder(resp.Body).Decode(&responseMap)
c.AbortWithStatusJSON(resp.StatusCode, responseMap)
Expand Down

0 comments on commit ec738dc

Please sign in to comment.