feat: print user id when error
This commit is contained in:
1 parent
c6dcdec988
commit
3f2df317e4
3 files changed
+6
-4
No files matched your search
+2
-1
@@ -6,9 +6,10 @@ import (
|
||||
)
|
||||
|
||||
func abortWithOpenAiMessage(c *gin.Context, statusCode int, message string) {
|
||||
userId := c.GetInt("id")
|
||||
c.JSON(statusCode, gin.H{
|
||||
"error": gin.H{
|
||||
"message": common.MessageWithRequestId(message, c.GetString(common.RequestIdKey)),
|
||||
"message": common.MessageWithRequestId(message, c.GetString(common.RequestIdKey), userId),
|
||||
"type": "new_api_error",
|
||||
},
|
||||
})
|
||||
|
||||
Reference in new issue
Block a user