moulendra143 commented on PR #5667:
URL: https://github.com/apache/fineract/pull/5667#issuecomment-4116963172

   Hi,
   
   I have looked into this issue and analyzed the current implementation in 
LoansApiResource.retrieveApprovalTemplate(...).
   
   It appears that when templateType is not "approval", there is no explicit 
validation, which results in a null/empty response being returned instead of an 
error.
   
   My proposed approach is:
   - Add validation for templateType at the beginning of the method
   - If the value is not "approval", throw NotSupportedLoanTemplateTypeException
   - Follow the same pattern already used in other template-related methods for 
consistency
   
   This should ensure proper error handling and prevent silent failures.
   
   Please let me know if this approach looks good. I can proceed with the 
implementation.
   
   Thanks!


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to