flask-pymongo
flask-pymongo copied to clipboard
Collection.find_one_or_404 hides stack trace
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.)