Skip to content
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

When you are binded to a document that doesn't exist yet, a console error is thrown. #49

Open
MgenGlder opened this issue Aug 8, 2020 · 1 comment

Comments

@MgenGlder
Copy link

🐛 Bug Report

When I run my vue-firestore powered app and connect it to a document inside of a collection that doesn't exist (yet) I get the error.

Uncaught (in promise) Error: This document (currentBallot) is not exist or permission denied.

Expected Bevavior

There should be an option to suppress/allow this happenstance, because in my case my document won't exist until it is created. This is expected as part of the design of the app, as the app is checking to see if the result of the query returns a valid Firestore object or not.
If not, there is logic that checks against empty or a length of 0 for that document, and it behaves accordingly.
Screen Shot 2020-08-08 at 5 33 27 PM
Looks like the grammar is also incorrect on this one too.

This document <document name> is not exist or permission denied.

should be

The document <document name> doesn't exist or permission was denied

@MgenGlder
Copy link
Author

reject(new Error(`This document (${key}) is not exist or permission denied.`));

Seems to be the culprit. I think the error throwing here should be optional- or maybe exposed as a development-level warning. Wouldn't want that kind of error showing up in a prod environment. Going to play with it a see if I can't come up with a solution. Curious to know your thoughts as well.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant