diff --git a/api/blueprints/mail/oauth_callback.py b/api/blueprints/mail/oauth_callback.py index 092e0e0..8780935 100644 --- a/api/blueprints/mail/oauth_callback.py +++ b/api/blueprints/mail/oauth_callback.py @@ -283,14 +283,19 @@ async def mail_auth_callback( # ┣┫┏┓┏┓┏┫┃┏┓ ┃ ┏┓┃┃┣┓┏┓┏┃┏┏ # ┛┗┗┻┛┗┗┻┗┗ ┗┛┗┻┗┗┗┛┗┻┗┛┗┛ - if mail_client == "gmail": return await handle_gmail_callback() - # try: - # - # if mail_client == "gmail": return await handle_gmail_callback() - # - # except Exception as exception: - # - # pass + try: + + if mail_client == "gmail": return await handle_gmail_callback() + + # If something goes wrong: + except Exception as exception: return await render_template( + "/mail/oauth/oauth_failure_v2.html", + mail_client = mail_client.title(), + failure_hint = ( + f"An internal server error occurred. " + f"Please use log-id '{g.log_id}' to check with the support team." + ) + ) # ┓┏ ┓┓ ┳ ┓• ┓ ┏┓┓• # ┣┫┏┓┏┓┏┫┃┏┓ ┃┏┓┓┏┏┓┃┓┏┫ ┃ ┃┓┏┓┏┓╋ diff --git a/models/data/core/auth_token.py b/models/data/core/auth_token.py index ad5155b..22bc14b 100644 --- a/models/data/core/auth_token.py +++ b/models/data/core/auth_token.py @@ -152,7 +152,7 @@ class CoreAuthTokenModel(BaseModel): clientUserId: dict = Field( description = "how third-party client identifies the same user", - frozen = True + frozen = False ) status: Literal["pending", "active", "disabled"] = Field(