The first method to be extracted is handle_errors Part of the work for: https://fedorahosted.org/freeipa/ticket/2660