wilfred-s commented on PR #922:
URL: https://github.com/apache/yunikorn-core/pull/922#issuecomment-2261715713

   In PR #530 we removed the missing parameter checks and moved to a simple nil 
check for the whole params array. We did that because the httprouter will not 
call the handler unless we have a match in the URL. The nil check is a defence 
in depth. In normal operation we can never call any of the handler functions 
without the variables set as the URL matching will fail before that. I think we 
forgot to clean up the user and group check.
   
   If we can show that a call made via the httprouter, not directly calling the 
handler in test code, can have missing parameters we should add these checks. 
If they are always present, with a value or not, we should not add the check 
and leave it to the handled as a "Not Found" error. 
   For this change I would go the other direction: remove specific param checks


-- 
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