update token refresh expire time rule (#67)

* update token refresh expire time rule

* update token refresh time checks
This commit is contained in:
Wu Clan
2023-05-21 23:16:02 +08:00
committed by GitHub
parent dc1ee04211
commit 7e16414c5b
6 changed files with 46 additions and 17 deletions

View File

@ -75,9 +75,9 @@ def register_exception(app: FastAPI):
_msg = error.get('msg')
errors_len = errors_len - 1
message += (
f'{data.get(field, field)} {_msg}' + ', '
f'{data.get(field, field) if field != "__root__" else ""} {_msg}' + ', '
if errors_len > 0
else f'{data.get(field, field)} {_msg}' + '.'
else f'{data.get(field, field) if field != "__root__" else ""} {_msg}' + '.'
)
elif isinstance(raw_error.exc, json.JSONDecodeError):
message += 'json解析失败'