Exceptional extension for Flask