How do I get firebase-document
to callback an error event after a request fails? (Or at least a notification the request has completed so I can imperatively check the response to see if I received the expected data?)
For example, if I enter an illegal character in the path like a dot (.
), let's say...
<firebase-document id="doc"
app-name="app"
data="{{user}}">
</firebase-document>
<script>
...
this.$.doc.path = 'email-address/[email protected]'; // Dot not accepted
...
</script>
And I get the following error message:
Uncaught Error: Firebase.child failed: First argument was an invalid path: "email-address/[email protected]". Paths must be non-empty strings and can't contain ".", "#", "$", "[", or "]"
Seems like an error
event (or something) should automatically fire. But the docs don't mention any.
How can I get an exception callback or at least a notification the response has completed?