Hello Xano Community,
I'm trying to check the existence of a record given an UID.
The UIDs are generated using the Generate UID function when a reservation is create or when is some rare case we need to rewrite them all.
Unfortunately, when trying to filter a reservation or checking if a reservation exists, the system returns me this error:
SQLSTATE[22P02]: Invalid text representation: 7 ERROR: invalid input syntax for type uuid: "" (SQL: select "dbo".*, ("dbo"."xdo"->>'uid')::uuid from "mvpw1_5" as "dbo" where ("dbo"."xdo"->>'uid')::uuid = '1088bc67-c56f-4694-8a1b-8eca9e4612ac' order by ("dbo"."xdo"->>'uid')::uuid asc limit 1)
OR:
SQLSTATE[22P02]: Invalid text representation: 7 ERROR: invalid input syntax for type uuid: "" (SQL: select "Reservation".* from "mvpw1_5" as "Reservation" where ("Reservation"."xdo"->>'uid')::uuid = '1088bc67-c56f-4694-8a1b-8eca9e4612ac')
After investigation, I improve the scenario in order to ensure that the uid value is not NULL or an empty string before performing the cast to UUID. So I added conditions to filter out invalid values for uid before casting.
But the same error occurs.
When I include a body like this:
{ "session_id": "7e6dfa6f-fb10-4a58-87c6-4e9267793e86" }
I got the same two errors.
I'm wondering if I'm doing something wrong or inadequate.
Any help or advice would be greatly appreciate, thank you very much.
Best regards,