I found this little gotcha when converting plugins from 20-17 to 2019 for a client. The call to the ScriptingSupport client does not return any error indication if the script file does not exist. This took longer than it should have to resolve. If the call had returned an error, say FE_NameNotFound, the problem would have been immediately obvious. I have created a bug, which you may care to vote for, which includes code to illustrate the problem.
This is the output written to the console for the test code. The second script does not exist and ScriptingSupport returns no indication of this. Note that FA_errorno will only have non zero values if F_ApiCallClient itself has problem. It is up to ScriptingSupport (FrameMakerScriptingSupport.dll) to return other than zero if a problem occurs, or the return value from the script, if one is provided.
I am already return values in extendscripts. I cannot envisage, in a commercial environment at least, where you wouldn't want to know if the script succeeded or had an error. This is the annoying thing about this bug; having the scripting support client returning 0, usually means everything was okay.
I use notifications from Extendscripts to access plugin functions.
As you surmised, returning values or notifications do not help in this case, as the script is never processed.