sveltefire icon indicating copy to clipboard operation
sveltefire copied to clipboard

Error handling on invalid permissions

Open alexvdvalk opened this issue 2 years ago • 3 comments

In the <Doc> component, if i pass an invalid ref, I get an error in the console, but currently, there is no way to show an error back to the user.

I suspect the same might go for the <Collection> component.

alexvdvalk avatar Aug 22 '23 16:08 alexvdvalk

@alexvdvalk, could you please give more details about the component you are facing the issue with? Is your issue about StorageList? UploadTask? Other?

JeremyVoisin avatar Aug 22 '23 19:08 JeremyVoisin

@alexvdvalk, could you please give more details about the component you are facing the issue with? Is your issue about StorageList? UploadTask? Other?

Sorry, github removed the component names. I've updated the original post

alexvdvalk avatar Aug 22 '23 20:08 alexvdvalk

Thanks for the update! In my opinion, the best way to handle errors is to decompose the store state to hold errors when there is some. I will submit a PR with this new feature tomorrow. In the meantime, I will let @codediodeio give his thought on this approach 🙂

JeremyVoisin avatar Aug 22 '23 21:08 JeremyVoisin