protected function handleValidationError(ValidationException $e, $errorCode = 409) {
        $entity = $e->getEntity();
        foreach($entity->getMessages() as $message) {
            $this->addError(new Exception($message->getMessage(), $errorCode));
        }
    }