mirror of
https://git.sr.ht/~tsileo/microblog.pub
synced 2024-12-22 13:14:28 +00:00
Tweak error wording
This commit is contained in:
parent
b99552384c
commit
9093659b0a
2 changed files with 2 additions and 2 deletions
|
@ -213,6 +213,6 @@ def verify_csrf_token(
|
||||||
logger.exception("Failed to verify CSRF token")
|
logger.exception("Failed to verify CSRF token")
|
||||||
raise HTTPException(
|
raise HTTPException(
|
||||||
status_code=403,
|
status_code=403,
|
||||||
detail=f"The security token expired, {please_try_again}",
|
detail=f"The security token has expired, {please_try_again}",
|
||||||
)
|
)
|
||||||
return None
|
return None
|
||||||
|
|
|
@ -276,7 +276,7 @@ async def _check_access_token(
|
||||||
if now() > access_token_info.created_at.replace(tzinfo=timezone.utc) + timedelta(
|
if now() > access_token_info.created_at.replace(tzinfo=timezone.utc) + timedelta(
|
||||||
seconds=access_token_info.expires_in
|
seconds=access_token_info.expires_in
|
||||||
):
|
):
|
||||||
logger.info("Access token is expired")
|
logger.info("Access token has expired")
|
||||||
return False, None
|
return False, None
|
||||||
|
|
||||||
return True, access_token_info
|
return True, access_token_info
|
||||||
|
|
Loading…
Reference in a new issue