auth-helpers
auth-helpers copied to clipboard
invalid input syntax for type uuid: \"\"
I keep getting
{
"code": "22P02",
"details": null,
"hint": null,
"message": "invalid input syntax for type uuid: \"\""
}
when passing this
const p_user_id = userId as UUID;
console.log("p_user_id", p_user_id); // totally fine I even validated with uuidValidate
const { data, error } = await supabase.rpc("fetch_user_roles_permissions", {
p_user_id,
});
However when I put quotes around it, I get the uuid in the response error like:
{
"code": "22P02",
"details": null,
"hint": null,
"message": "invalid input syntax for type uuid: \"\"7979b040-3f6e-42ec-8318-ee696638bbde\"\""
}
What happens to the UUID? And why the error?