protected override async Task HandleCore(SubmitCommitmentCommand message)
        {
            var validationResult = _validator.Validate(message);

            if (!validationResult.IsValid())
            {
                throw new InvalidRequestException(validationResult.ValidationDictionary);
            }

            var commitment = await _commitmentApi.GetEmployerCommitment(message.EmployerAccountId, message.CommitmentId);

            if (commitment.EmployerAccountId != message.EmployerAccountId)
            {
                throw new InvalidRequestException(new Dictionary <string, string> {
                    { "Commitment", "This commitment does not belong to this Employer Account " }
                });
            }

            var submission = new CommitmentSubmission
            {
                Action            = message.LastAction,
                LastUpdatedByInfo = new LastUpdateInfo {
                    Name = message.UserDisplayName, EmailAddress = message.UserEmailAddress
                },
                UserId  = message.UserId,
                Message = message.Message
            };

            if (message.LastAction != LastAction.Approve)
            {
                await _commitmentApi.PatchEmployerCommitment(message.EmployerAccountId, message.CommitmentId, submission);
            }
            else
            {
                await _commitmentApi.ApproveCohort(message.EmployerAccountId, message.CommitmentId, submission);
            }

            if (_configuration.CommitmentNotification.SendEmail &&
                message.LastAction != LastAction.None)
            {
                await SendNotification(commitment, message);
            }
            _logger.Info("Submit commitment");
        }