The way you create error handlers in flask is similar to how you create routes except you will use a different decorator. see below
@errors.app_errorhandler(404) # the beginning 'errors' is just the name of your blueprint if there's onedef error_404(error): return render_template('errors/404.html'), 404After that just create your templates and write some display