How to handle ordering of flask error handlers
Error handlers follow the exception class MRO, or method resolution order, and a handler is looked up in that order; the specific exception type first, then it's direct parent class, etc, all the way down to BaseException and object.
There is no need to order anything; if you registered a handler for Exception, then it'd be used for any exception for which no more specific handler was found.
How does one ensure that the flask error handlers get the most specific exception?
From some simple tests and looking at the source code, it looks like the flask error handling code just takes the first register error handler for a given exception type instead of the most specific type possible.
I guess the answer is to put the error handler for Exception at the very end?