mirror of
https://github.com/songquanpeng/one-api.git
synced 2026-04-29 04:44:25 +08:00
Merge 0527993dd9 into 8b8cd03e85
This commit is contained in:
@@ -96,10 +96,16 @@ func Relay(c *gin.Context) {
|
||||
|
||||
// BUG: bizErr is in race condition
|
||||
bizErr.Error.Message = helper.MessageWithRequestId(bizErr.Error.Message, requestId)
|
||||
if bizErr.StatusCode < 500 || bizErr.StatusCode >= 100 {
|
||||
c.JSON(http.StatusInternalServerError, gin.H{
|
||||
"error": bizErr.Error,
|
||||
})
|
||||
} else {
|
||||
c.JSON(bizErr.StatusCode, gin.H{
|
||||
"error": bizErr.Error,
|
||||
})
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
func shouldRetry(c *gin.Context, statusCode int) bool {
|
||||
|
||||
Reference in New Issue
Block a user