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

Exception Should be thrown for NotFound Document #18

Open
juviwhale opened this issue Nov 12, 2019 · 0 comments
Open

Exception Should be thrown for NotFound Document #18

juviwhale opened this issue Nov 12, 2019 · 0 comments

Comments

@juviwhale
Copy link

Non existent docs should raise an exception.

Example:

try:
    doc = db.collection('users').document('thisDoesNotExist').get()
    print(u'Document data: {}'.format(doc.to_dict()))
except google.cloud.exceptions.NotFound:
    print(u'No such document!')
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