如何在请求失败后让firebase-document
回调错误事件? (或者至少是通知请求已经完成,所以我可以检查响应,看看我是否收到了预期的数据?)
例如,如果我在路径中输入非法字符(如点.
),请说...
<firebase-document id="doc"
app-name="app"
data="{{user}}">
</firebase-document>
<script>
...
this.$.doc.path = 'email-address/user@example.com'; // Dot not accepted
...
</script>
我收到以下错误消息:
未捕获错误:Firebase.child失败:第一个参数是无效路径:&#34; email-address/user@example.com"。路径必须是非空字符串,并且不能包含&#34;。&#34;,&#34;#&#34;,&#34; $&#34;,&#34; [& #34;,或&#34;]&#34;
似乎应该自动触发error
事件(或其他)。 But the docs don't mention any
如何获得异常回调或至少是响应已完成的通知?