feat: show token info when quota is not enough (close #1274)
This commit is contained in:
parent
77f9e75654
commit
9a2662af0d
@ -63,7 +63,7 @@ func ValidateUserToken(key string) (token *Token, err error) {
|
||||
return nil, errors.New("令牌验证失败")
|
||||
}
|
||||
if token.Status == common.TokenStatusExhausted {
|
||||
return nil, errors.New("该令牌额度已用尽")
|
||||
return nil, fmt.Errorf("令牌 %s(#%d)额度已用尽", token.Name, token.Id)
|
||||
} else if token.Status == common.TokenStatusExpired {
|
||||
return nil, errors.New("该令牌已过期")
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user