500 handler

This commit is contained in:
Kenneth Reitz
2011-10-15 11:51:43 -04:00
parent 7f489529e1
commit 148e27c8da
+4
View File
@@ -34,6 +34,10 @@ app = Flask(__name__)
# Routes
# ------
@app.errorhandler(500)
@filters.json
def page_not_found(e):
return {'error': True, 'why': str(e)}
@app.route('/')
def view_landing_page():