-
Notifications
You must be signed in to change notification settings - Fork 461
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
signOut: do not show "You are not authorized to access this db." error #262
Comments
Is this changing the error message in a general way for the HoodieUnauthorizedError? Or is there call to modify the error call for hoodie.account.signOut().fail( showError ) instead? Is the db message needing to still be there for other cases? |
yes that message would make sense if you try to access a database that you are not allowed to, e.g. via So the error should be saying something like "You have local changes but your session is invalid, please reauthenticate". Maybe you have a better wording idea, I'm not native English speaking |
closing in favor of hoodiehq/hoodie-account-client#91 |
To reproduce
hoodie.store.hasLocalChanges()
returns truehoodie.account.signOut().fail( showError )
showError gets called with
The error should be something more generic instead. What happens in the background is that hoodie pushes local changes to remote in case there are any, so no data gets lost. And if there are changes and the push does not succeed, the signOut gets rejected. I don't know what the best error message would be to concisely explain the problem to the user.
As a side note, you can call
signOut({ignoreLocalChanges: true})
to prevent that error from popping up, but that also means that eventual local changes get lost.The text was updated successfully, but these errors were encountered: