invalid input syntax for type uuid 'text'
# sql
o
invalid input syntax for type uuid 'text'
my function:
Copy code
sql
begin
  INSERT INTO public.payment(user_id, therpay_session_id)
    VALUES (userid, sessionid);
  INSERT INTO public.booking(user_id, therpay_session_id)
    VALUES (userid, sessionid);
    return id;
end;
both variable types are set to uuid my
rpc
call from the client
Copy code
js
const { data, error } = await supabase.rpc(
  'record_payment_and_booking', {
     userid: userId,
     sessionid: sessionId,
   }
 )
 console.log({data})
})
my error
Copy code
{
  message: 'invalid input syntax for type uuid: "5"',
  code: '22P02',
  details: null,
  hint: null
}
Any idea how I can pass the data correctly from frontend?
On the frontend the userid and sessionid are of type string