nipunn
nipunn•2y ago

Me and ballingt 9068 just pair

Me and @ballingt just pair programmed for a bit and updated the error message to look a bit more like this - which is hopefully more helpful in the future.
Uncaught Error: [CONVEX Q(listMessages.js:default)] Uncaught Error: QueryImpl {"state":{"type":"preparing","query":{"source":{"type":"FullTableScan","tableName":"messages","order":"desc"},"operators":[]}}} is not a supported Convex type.
Uncaught Error: [CONVEX Q(listMessages.js:default)] Uncaught Error: QueryImpl {"state":{"type":"preparing","query":{"source":{"type":"FullTableScan","tableName":"messages","order":"desc"},"operators":[]}}} is not a supported Convex type.
4 Replies
nipunn
nipunnOP•2y ago
Ideally we could make an even better error message that indicates it's a return value, but this is at least a step up - indicating the type and content of the bad value.
magicseth
magicseth•2y ago
I'm afraid that new error message means nothing to me either 😕
nipunn
nipunnOP•2y ago
That's pretty fair. The difference is that we printed the "bad" object name QueryImpl, but given that it's one of our objects (the return from .order() before .collect()) and not one of your objects, it's probably all nonsense. We gotta do even better with error messages!
ballingt
ballingt•2y ago
Let's do the special case, "looks like you returned a query without collecting"

Did you find this page helpful?