Table exists but function says not found

In an edge function I want to implement a simple caching mechanism. For this I have added

// Persistent cache check
  const { data: cached, error: cacheError } = await supabase
    .from('image_analysis_cache')
    .select('result')
    .eq('image_url', imageUrl)
    .single();

  if (cached && cached.result) {
    console.log("[EdgeFunction DEBUG]: Returning cached Vision API response.");
    return new Response(JSON.stringify(cached.result), {
      headers: { 'Content-Type': 'application/json' },
    });
  }
  else if (cacheError){
    console.log("[EdgeFunction DEBUG]: error when fetching image from table: " + JSON.stringify(cacheError) );
  }

When the above runs i get logs output ...

2025-06-25T03:10:42.960122092Z [Info] [EdgeFunction DEBUG]: error when fetching image from table: {"code":"42P01","details":null,"hint":null,"message":"relation \"public.image_analysis_cache\" does not exist"}


But the table does indeed exists as per screenshot, so what else do i do?
SupabaseTableExists_2025-06-25_07-15-26.png
Was this page helpful?