Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

invalid input syntax for type uuid: \"\" #803

Open
robksawyer opened this issue Jun 22, 2024 · 0 comments
Open

invalid input syntax for type uuid: \"\" #803

robksawyer opened this issue Jun 22, 2024 · 0 comments
Labels
bug Something isn't working

Comments

@robksawyer
Copy link

robksawyer commented Jun 22, 2024

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?

@robksawyer robksawyer added the bug Something isn't working label Jun 22, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant