SONAR-4475 Restore reverted commit by fixing errors catching when deleting a user