Id format change with 0.17
Here's some real data (but for PII scrubbing) along with the validator that the error is matching it against.
It looks like it should match to me. Is this related to https://discord.com/channels/1019350475847499849/1122957485372887201 ?
8 Replies
What's the validation error you get with this @RJ ?
In the logs from the Convex dashboard:
Uncaught Error: Failed to insert or update a document in table "orders" because it does not match the schema: Value does not match validator.
Followed by that value and that validator
(that's one example)how are you getting the
brandPartnerId
? i believe valid ids are all lowercaseUhhh it was hard-coded 😳
(I know, shame on me)
I guess ID encodings changed with
0.17
?yep they are now base32 instead of base64, and encode the table within the id. you can use
db.normalizeId("brandPartners", "<hardcoded>")
to get the new idGot it, entirely my mistake then. I'll update my code and see if that fixes it. Thank you @lee!
(The error message here was pretty uninformative, so we'll see if we can make it better)
Confirmed, that was the problem and it's now fixed