fix: combine f-strings, align product name in notification titles
Agent-Logs-Url: https://github.com/christianlouis/InboxConverge/sessions/2bcd611e-3598-4b83-95bd-3276a7d5ad7c Co-authored-by: christianlouis <361235+christianlouis@users.noreply.github.com>
This commit is contained in:
committed by
GitHub
parent
992e157f02
commit
3470213fb3
@@ -469,7 +469,7 @@ class GmailService:
|
|||||||
)
|
)
|
||||||
GMAIL_TOKEN_REFRESHES_TOTAL.inc()
|
GMAIL_TOKEN_REFRESHES_TOTAL.inc()
|
||||||
logger.info(
|
logger.info(
|
||||||
"Gmail access token refreshed proactively; " "new expiry: %s",
|
"Gmail access token refreshed proactively; new expiry: %s",
|
||||||
self.credentials.expiry,
|
self.credentials.expiry,
|
||||||
)
|
)
|
||||||
return {
|
return {
|
||||||
@@ -477,10 +477,7 @@ class GmailService:
|
|||||||
"expiry": self.credentials.expiry,
|
"expiry": self.credentials.expiry,
|
||||||
}
|
}
|
||||||
except google.auth.exceptions.RefreshError as e:
|
except google.auth.exceptions.RefreshError as e:
|
||||||
error_msg = (
|
error_msg = f"Gmail refresh token has been revoked or is invalid — the user must re-authorise. Detail: {e}"
|
||||||
f"Gmail refresh token has been revoked or is invalid — "
|
|
||||||
f"the user must re-authorise. Detail: {e}"
|
|
||||||
)
|
|
||||||
logger.error(error_msg)
|
logger.error(error_msg)
|
||||||
raise GmailAuthError(error_msg)
|
raise GmailAuthError(error_msg)
|
||||||
except Exception as e:
|
except Exception as e:
|
||||||
|
|||||||
@@ -903,7 +903,7 @@ async def refresh_gmail_tokens():
|
|||||||
await send_user_notification(
|
await send_user_notification(
|
||||||
db=notif_db,
|
db=notif_db,
|
||||||
user_id=int(cred.user_id),
|
user_id=int(cred.user_id),
|
||||||
title="InboxConverge: Gmail Re-authorisation Required",
|
title="InboxRescue: Gmail Re-authorisation Required",
|
||||||
body=(
|
body=(
|
||||||
"Your Gmail access has been revoked. "
|
"Your Gmail access has been revoked. "
|
||||||
"Please open Settings → Gmail API and click "
|
"Please open Settings → Gmail API and click "
|
||||||
|
|||||||
Reference in New Issue
Block a user