Skip to content

Commit

Permalink
Adjust log
Browse files Browse the repository at this point in the history
  • Loading branch information
elie222 committed Jan 24, 2025
1 parent f101c60 commit 31ee376
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions apps/web/utils/gmail/permissions.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ import { createScopedLogger } from "@/utils/logger";

const logger = createScopedLogger("Gmail Permissions");

// TODO: this can also error on network error
export async function checkGmailPermissions(
accessToken: string,
email: string,
Expand All @@ -28,7 +29,7 @@ export async function checkGmailPermissions(
const data = await response.json();

if (data.error) {
logger.error("Error checking Gmail permissions:", {
logger.error("Invalid token or Google API error", {
email,
error: data.error,
});
Expand All @@ -54,7 +55,7 @@ export async function checkGmailPermissions(

return { hasAllPermissions, missingScopes };
} catch (error) {
logger.error("Error checking Gmail permissions:", { email, error });
logger.error("Error checking Gmail permissions", { email, error });
return {
hasAllPermissions: false,
missingScopes: SCOPES, // Assume all scopes are missing if we can't check
Expand Down

1 comment on commit 31ee376

@vercel
Copy link

@vercel vercel bot commented on 31ee376 Jan 24, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.