Closed muellerdberlin closed 2 years ago
hi @muellerdberlin
did you try explicitely Disconnect
the action that failed before retrying? also, are you sure you are logged in before retrying?
Thank you @joaqcid
I solved it by adding a catchError
into the pipe after collection$ call to handle a permission error.
It would be great to have a default way to handle thrown (permission) errors by firebase without showing it in the console (eg. for production purpose), but rather to handle the error (in development or monitoring tools) including the failed path and data.
I have the problem, after stream connection errored because of "missing or insufficient permissions" of firestore, I cannot connect to the stream again. It just throws another error of firebase sdk at second try.
First I connect with "cancelprevious: true" attribute in ngxsOnInit:
Then I dispatch the action and want to start the stream somewhere in my code:
store.dispatch(new ListenToSomeThing());
Result in console. I'm using StreamErrored and StreamDisconnected to catch the next two logs.
I try it again (does'nt matter if the second call would have been accepted by firestore or not, it is not started at all, this is the only log):
My question: How can I catch the firestore problem or reconnect an errored stream by using the firestore plugin? I didn't find something in the documentation yet.
Thank you very much!