Empty field names are disallowed
I'm still on 0.14.1 and I'm getting an
Empty Field Names are disallowed.
error. Since it's coming from a mutation within an action, I can't log the fields before I attempt storage/update. Could this error be made to be more informative?7 Replies
Is it possible that you're storing an object where there's a key that has a
.toString()
that returns ""
?
but agreed that it'd be helpful to have more debugging info. Have you tried calling console.log()
and viewing the log output on the dashboard?I'm storing
const res = {
userId,
messageId: messages[i].id,
conversationId: messages[i].conversationId,
listingMapId: messages[i].listingMapId,
communicationType: messages[i].communicationType,
body: messages[i].body,
responseData: messages[i],
};
and userId is of type Id<"users">
doesn't seem like any of the keys are "" after looking at console.logcould
body
or responseData
by themselves objects which have an empty field name? if you're able to log the full expansion of res
that may point to a smoking gun. the restriction on non-empty field names applies to nested fields not just top-level onesUnrelated to the actual fix:
it's coming from a mutation within an action, I can't log the fields before I attempt storage/update"You should be able to log the fields and see it in the action logs?
Ah okay i will have a look at that. The nested object might be the issue here.
I can't see them in action logs either. Only
console.log()
on the same level of the action is shown.
there was a three level nested ''
as a key. Thanks for the help!
@presley Also FYI I'm not able to scroll horizontally in the dashboard and the action logs aren't scrollable. On chrome.Thanks for the heads up on the scrolling issues! We're working on getting a fix out now
The error was being thrown while being passed as parameters so it never got to my log in the sub-level mutation. I initially thought it was related to storage