`@app.errorhandler(404)` doesn't work, so I used `baseframe`. While using `@app.errorhandler(404)` baseframe errorhandler takes precedence .