Apart from the log, this is a block copy of the end of delete_all_identities.  Break this up into a failure callback method, which logs and then calls a delete_private_identities method, which is common with the last few lines of delete_all_identites.