Skip to content

Commit 7930d9a

Browse files
committed
環境変数の欠如をデバッグするためのログ出力を追加
1 parent 7d8979f commit 7930d9a

File tree

1 file changed

+7
-0
lines changed
  • supabase/functions/task-management

1 file changed

+7
-0
lines changed

supabase/functions/task-management/index.ts

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -95,6 +95,13 @@ Deno.serve(async (req) => {
9595
const jwtSecret = Deno.env.get("SUPABASE_JWT_SECRET"); // Checked here for early exit
9696

9797
if (!supabaseUrl || !serviceRoleKey || !anonKey || !jwtSecret) {
98+
// debug用にどの環境系変数が欠けているかをログに出力
99+
console.error("Environment variables:");
100+
console.error("SUPABASE_URL:", supabaseUrl);
101+
console.error("SUPABASE_SERVICE_ROLE_KEY:", serviceRoleKey);
102+
console.error("SUPABASE_ANON_KEY:", anonKey);
103+
console.error("SUPABASE_JWT_SECRET:", jwtSecret);
104+
98105
console.error(
99106
"Missing one or more required environment variables: SUPABASE_URL, SUPABASE_SERVICE_ROLE_KEY, SUPABASE_ANON_KEY, SUPABASE_JWT_SECRET",
100107
);

0 commit comments

Comments
 (0)