I've seen behavior where the second or third initialization of the exception translation wrapper doesn't correctly dereference the lazy_translations in __new__ which leads to some exceptions not being translated and therefore HTTP 500 errors coming through to the user.
This pull request makes the wrapper more reliable by removing the need for __new__ and simplifying the code to dereference the lazy_translations only at usage time.
I've seen behavior where the second or third initialization of the exception translation wrapper doesn't correctly dereference the
lazy_translations
in__new__
which leads to some exceptions not being translated and therefore HTTP 500 errors coming through to the user.This pull request makes the wrapper more reliable by removing the need for
__new__
and simplifying the code to dereference thelazy_translations
only at usage time.