public async Task <bool> Handle(UpdateOrganisationLegalNameRequest request, CancellationToken cancellationToken) { var legalName = _textSanitiser.SanitiseInputText(request.LegalName); if (!_validator.IsValidLegalName(legalName)) { string invalidLegalNameError = $@"Invalid Organisation Legal Name '{legalName}'"; _logger.LogInformation(invalidLegalNameError); throw new BadRequestException(invalidLegalNameError); } _logger.LogInformation($@"Handling Update '{FieldChanged}' for Organisation ID [{request.OrganisationId}]"); var auditRecord = _auditLogService.AuditLegalName(request.OrganisationId, request.UpdatedBy, legalName); if (!auditRecord.ChangesMade) { return(await Task.FromResult(false)); } var success = await _updateOrganisationRepository.UpdateLegalName(request.OrganisationId, legalName, request.UpdatedBy); if (!success) { return(await Task.FromResult(false)); } return(await _updateOrganisationRepository.WriteFieldChangesToAuditLog(auditRecord)); }