protected function internalDeletePolicy(APIPolicy $policy) { $this->repository->beginTransaction(); try { $this->userHandler->deletePolicy($policy->id); $this->repository->commit(); } catch (Exception $e) { $this->repository->rollback(); throw $e; } }