LOCAL setup db error: No suitable key or wrong key type
Hi, I'm experiencing an issue in local setup where trying to access my supabase table from my client returns with the error
{"code": "PGRST301", "details": null, "hint": null, "message": "No suitable key or wrong key type"}. This error does not occur in Production.
When setting up my local, I've already followed the appropriate steps like setting up Docker, running db pull && db migration up to recreate my production schema in my local.
In my table, I've already enabled RLS to enable SELECT on my table for authenticated users with the 'using' condition as '(( SELECT auth.uid() AS uid) = user_id)'.
From my client, I am calling my table like so:
try {
const { data, error } = await supabase.from("table").select();
if (error) throw error;
return data;
} catch (e) {
console.log(e);
}
Any help would be appreciated. Thank you
{"code": "PGRST301", "details": null, "hint": null, "message": "No suitable key or wrong key type"}. This error does not occur in Production.
When setting up my local, I've already followed the appropriate steps like setting up Docker, running db pull && db migration up to recreate my production schema in my local.
In my table, I've already enabled RLS to enable SELECT on my table for authenticated users with the 'using' condition as '(( SELECT auth.uid() AS uid) = user_id)'.
From my client, I am calling my table like so:
try {
const { data, error } = await supabase.from("table").select();
if (error) throw error;
return data;
} catch (e) {
console.log(e);
}
Any help would be appreciated. Thank you