public async Task <GetNextBatchNumberResponse> Handle(GetNextBatchNumberRequest request, CancellationToken cancellationToken) { var errorMessage = string.Empty; int response = 0; try { response = await _infoServiceWrapper.GetNextBatchNumber(request.AccountId); } catch (Exception ex) { errorMessage = ex.Message; } return(await Task.FromResult(new GetNextBatchNumberResponse { Success = string.IsNullOrEmpty(errorMessage) ? true : false, ErrorMessage = errorMessage, GetNextBatchNumberResult = response })); }