1

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/user@example.com'; // Dot not accepted
...
</script>

And I get the following error message:

Uncaught Error: Firebase.child failed: First argument was an invalid path: "email-address/user@example.com". 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?

Let Me Tink About It
  • 15,156
  • 21
  • 98
  • 207

0 Answers0