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

Collection.find_one_or_404 hides stack trace #159

Open
Joe-Heffer-Shef opened this issue Aug 23, 2022 · 0 comments
Open

Collection.find_one_or_404 hides stack trace #159

Joe-Heffer-Shef opened this issue Aug 23, 2022 · 0 comments

Comments

@Joe-Heffer-Shef
Copy link

Hi,

When I try to retrieve a single item from a MongoDB collection and it isn't present, I want an error to be raised, which is the purpose of Collection.find_one_or_404. However, a 404 screen is shown which prevents me from seeing a stack trace (in Flask debug mode.)

Please could find_one_or_404 instead raise some kind of not-found exception, rather than using flask.abort. This way, I could see the stack trace (or handle the error appropriately using Flask error handlers.)

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