Error Reading
This section discusses how to understand error messages from Typescript.
Read The Last One
Most of the time we just need to read the last error message and ignore the rest. Example:

In this example, the correct field path is a
and __name__
(__name__
is a default comparison path of every document, see document Id)
Peeling or
and
Query Error Messages
or
and
Query
When using or
and
query, we need peel the error messages in order to find out the real culprit:


Nested or
and
Query
Nested or
and
query error messages are messy:

Solution is to peel until you see an error message that makes sense:

Currently it is a mess, I am still trying to understand why the error bubble up into a clunky error message.
Hopefully we dont need to peel any error anymore in the future.