register user errorhandler in the right order

solved the problem proposed by  #1291 in a lighter way,
thus determining the `exception  hierarchy` at app setup time instead of running time.
This line modifies ``self``, which is wrong. But why do the tests still pass?