public async Task <ActionResult <LoanCommentRespObj> > GetAllCreditLoanComment([FromQuery] LoanSearchObj model) { try { var response = _repo.GetAllCreditLoanComment(model.LoanId, model.LoanScheduleId); return(new LoanCommentRespObj { LoanComments = response, }); } catch (Exception ex) { var errorCode = ErrorID.Generate(5); _logger.Error($"ErrorID : {errorCode} Ex : {ex?.Message ?? ex?.InnerException?.Message} ErrorStack : {ex?.StackTrace}"); return(new LoanCommentRespObj { Status = new APIResponseStatus { IsSuccessful = false, Message = new APIResponseMessage { FriendlyMessage = "Error Occurred", TechnicalMessage = ex?.Message, MessageId = errorCode } } }); } }