The reference article is this
http://www.qingpingshan.com/b...
Those errors that directly rewrite 404,500 are no problem
But if you want to use your own defined errors, it is not possible, and errors cannot trigger this errorhandler(BaseError)
Customized errors
I didn’t see your BaseError very specifically
But the best practice is generally like this:
Define an exception
are all defined, remember to import it in the appropriate place (for example, import it inside
__init.py__
) to let flask know that you have defined this Exception processing class.