Add retcode and success to function not found

Fix #18512
Merge pull request #18654 from thatch45/func_fail

Add retcode and success to function not found