public async Task <ActionResult <LoanCommentRespObj> > GetAllCreditLoanDecision([FromQuery] LoanSearchObj model) { try { var response = _repo.GetAllCreditLoanDecision(model.LoanId, model.LoanScheduleId); return(new LoanCommentRespObj { LoanDecisions = 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 } } }); } }