From c87e05bfc2d46f98bc997f8c85e8b6c53a34a1d9 Mon Sep 17 00:00:00 2001 From: JustSong Date: Sun, 23 Jul 2023 09:49:46 +0800 Subject: [PATCH] chore: add more context in error message --- middleware/distributor.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/middleware/distributor.go b/middleware/distributor.go index a1baf52e..91c00e1a 100644 --- a/middleware/distributor.go +++ b/middleware/distributor.go @@ -86,7 +86,7 @@ func Distribute() func(c *gin.Context) { } channel, err = model.CacheGetRandomSatisfiedChannel(userGroup, modelRequest.Model) if err != nil { - message := "无可用渠道" + message := fmt.Sprintf("当前分组 %s 下对于模型 %s 无可用渠道", userGroup, modelRequest.Model) if channel != nil { common.SysError(fmt.Sprintf("渠道不存在:%d", channel.Id)) message = "数据库一致性已被破坏,请联系管理员"