You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When a field does not exist on a document, the Python Cloud Function throws an error KeyError, but for the Node.js implementation it simply returns undefined (preferred).
This is especially important for the on_document_written function, which might trigger for updates that need to be monitored, but if the document is created for the first time without fields yet, then this should not throw an error ideally.
The text was updated successfully, but these errors were encountered:
This could be due to the differences between these languages.
For example, in Python some_dict['invalid_property'] throws KeyError, when in Node some_dict['invalid_property'] returns undefined. Instead, you can probably use some_dict.get('invalid_property') (in Python) to get None returned.
Could you perhaps send over a code snippet that produces this issue, just to be certain?
When a field does not exist on a document, the Python Cloud Function throws an error KeyError, but for the Node.js implementation it simply returns undefined (preferred).
This is especially important for the on_document_written function, which might trigger for updates that need to be monitored, but if the document is created for the first time without fields yet, then this should not throw an error ideally.
The text was updated successfully, but these errors were encountered: