It's not pretty but it can be done. :P
That’s why my Python APIs never fatally crash, they just log an exception and move onto the next request.
It's not pretty but it can be done. :P