Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: fix token validation exception handling #901

Conversation

seven-yu
Copy link
Contributor

@seven-yu seven-yu commented Jan 4, 2024

问题:当DB连接数量达到数据库上限的时候,会报错 “无效的令牌”
排查发现没直接关联的错误的日志

1. add error log for ValidateUserToken
2. update en.json
@seven-yu seven-yu force-pushed the feature/seven-add-err-log-for-auth-token branch from 3ca9a70 to 9815dd0 Compare January 5, 2024 09:33
@seven-yu
Copy link
Contributor Author

seven-yu commented Jan 5, 2024

1、补充错误日志打印
2、异常处理优化:
另外不存在->无效的令牌
数据库异常->令牌验证失败

@songquanpeng songquanpeng changed the title feat: add error log for ValidateUserToken fix: fix token validation exception handling Jan 7, 2024
@songquanpeng songquanpeng merged commit 6227eee into songquanpeng:main Jan 7, 2024
greeeds pushed a commit to greeeds/one-api that referenced this pull request Mar 3, 2024
* fix: fix exception handling

1. add error log for ValidateUserToken
2. update en.json

* chore: update log

---------

Co-authored-by: seven.yu <seven.yu@dji.com>
Co-authored-by: JustSong <songquanpeng@foxmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants