diff --git a/backend/src/integrations/sync.ts b/backend/src/integrations/sync.ts index 89d8ba0e6..2867ad44f 100644 --- a/backend/src/integrations/sync.ts +++ b/backend/src/integrations/sync.ts @@ -317,8 +317,8 @@ const syncSecretsGCPSecretManager = async ({ } interface GCPSMListSecretsRes { - secrets: GCPSecret[]; - totalSize: number; + secrets?: GCPSecret[]; + totalSize?: number; nextPageToken?: string; } @@ -345,7 +345,9 @@ const syncSecretsGCPSecretManager = async ({ } )).data; - gcpSecrets = gcpSecrets.concat(res.secrets); + if (res.secrets) { + gcpSecrets = gcpSecrets.concat(res.secrets); + } if (!res.nextPageToken) { hasMorePages = false; diff --git a/frontend/src/pages/integrations/gcp-secret-manager/oauth2/callback.tsx b/frontend/src/pages/integrations/gcp-secret-manager/oauth2/callback.tsx index cc620af8b..740897496 100644 --- a/frontend/src/pages/integrations/gcp-secret-manager/oauth2/callback.tsx +++ b/frontend/src/pages/integrations/gcp-secret-manager/oauth2/callback.tsx @@ -7,7 +7,6 @@ import { } from "@app/hooks/api"; export default function GCPSecretManagerOAuth2CallbackPage() { - console.log("GCPSecretManagerOAuth2CallbackPage"); const router = useRouter(); const { mutateAsync } = useAuthorizeIntegration(); @@ -17,10 +16,6 @@ export default function GCPSecretManagerOAuth2CallbackPage() { (async () => { try { // validate state - - console.log("gcp oauth2 callback page"); - console.log("gcp oauth2 callback page code: ", code); - console.log("gcp oauth2 callback page state: ", state); if (state !== localStorage.getItem("latestCSRFToken")) return; localStorage.removeItem("latestCSRFToken"); @@ -30,8 +25,6 @@ export default function GCPSecretManagerOAuth2CallbackPage() { integration: "gcp-secret-manager" }); - console.log("integrationAuth: ", integrationAuth); - router.push(`/integrations/gcp-secret-manager/create?integrationAuthId=${integrationAuth._id}`); } catch (err) { console.error(err);