public async Task HandleAsync(ResolveRemark command)
        {
            File file = null;

            await _handler.Validate(async() =>
            {
                if (command.ValidatePhoto)
                {
                    var resolvedFile = _fileResolver.FromBase64(command.Photo.Base64, command.Photo.Name, command.Photo.ContentType);
                    if (resolvedFile.HasNoValue)
                    {
                        Logger.Error($"File cannot be resolved from base64, photoName:{command.Photo.Name}, " +
                                     $"contentType:{command.Photo.ContentType}, userId:{command.UserId}");
                        throw new ServiceException(OperationCodes.CannotConvertFile);
                    }
                    file        = resolvedFile.Value;
                    var isImage = _fileValidator.IsImage(file);
                    if (isImage == false)
                    {
                        Logger.Warning($"File is not an image! name:{file.Name}, contentType:{file.ContentType}, " +
                                       $"userId:{command.UserId}");
                        throw new ServiceException(OperationCodes.InvalidFile);
                    }
                }
                var remark = await _remarkService.GetAsync(command.RemarkId);
                if (remark.Value.Group == null)
                {
                    return;
                }
                await _groupService.ValidateIfRemarkCanBeResolvedOrFailAsync(remark.Value.Group.Id, command.UserId);
            })
            .Run(async() =>
            {
                Location location = null;
                if (command.Latitude != 0 && command.Longitude != 0)
                {
                    location = Location.Create(command.Latitude, command.Longitude, command.Address);
                }
                await _remarkStateService.ResolveAsync(command.RemarkId, command.UserId, command.Description,
                                                       location, file, command.ValidateLocation);
            })
            .OnSuccess(async() =>
            {
                var remark   = await _remarkService.GetAsync(command.RemarkId);
                var state    = remark.Value.GetLatestStateOf(RemarkState.Names.Resolved).Value;
                var resource = _resourceFactory.Resolve <RemarkResolved>(command.RemarkId);
                await _bus.PublishAsync(new RemarkResolved(command.Request.Id, resource,
                                                           command.UserId, command.RemarkId));
            })
            .OnCustomError(async ex => await _bus.PublishAsync(new ResolveRemarkRejected(command.Request.Id,
                                                                                         command.UserId, command.RemarkId, ex.Code, ex.Message)))
            .OnError(async(ex, logger) =>
            {
                logger.Error(ex, "Error occured while resolving a remark.");
                await _bus.PublishAsync(new ResolveRemarkRejected(command.Request.Id,
                                                                  command.UserId, command.RemarkId, OperationCodes.Error, ex.Message));
            })
            .ExecuteAsync();
        }