IjzerenHein / firestorter

Use Google Firestore in React with zero effort, using MobX 🤘
http://firestorter.com
MIT License
378 stars 50 forks source link

[Question] SnapshotError handler #71

Open rborn opened 5 years ago

rborn commented 5 years ago

Hi,

I see you handle the onSnapshotError case but it's just a warning. Is there any way to actually do anything in case this event occurs ?

Thanks

damonmaria commented 5 years ago

@rborn I'm not an expert but I'm pretty sure Firebase handles any network errors internally. So you won't be getting 'timeout' or 'disconnected' errors through this. All I've seen so far are errors about missing indexes.

rborn commented 5 years ago

@damonmaria or permissions. Would be good though to be able to handle at least the available errors

IjzerenHein commented 5 years ago

@rborn My experience is the same as @damonmaria, I've only seen that handler being triggered on misconfiguration issues.

@rborn What kind of error handling would you looking for, an overridable method on Document/Collection?

rborn commented 5 years ago

@IjzerenHein yeah, something like that. Indeed I only have this issue when the configuration changes, and I'm thinking that if in the future we need to change the configuration then we should be able to handle this app side.

damonmaria commented 5 years ago

My experience is they are only messages that you should see during development. Maybe being overridable would be useful in that during dev it's a console warning, but otherwise (like during testing or in production) it could be an error reported back / show stopper.