I'm using FMS 10.
I have a scheduled script that also logs such "errors" but is reported as "OK" after the scheduled script runs. Is this find the last step of the script?
Perhaps there's another reason the script is reporting "failed" instead of OK.
Maybe your can add those steps
Allow User Abort [ Off ]
Set Error Capture [ On ]
I'm my script I use
Perform Find [ ]
If [ Get ( FoundCount )=0 ]
Exit Script [ ] Or whatever you like
But FileMaker Server 11 doesn't, it only get "failed".
And no, it's the find that finds 0 records, as in error 401, it's stated in the logs. If it finds any record its all ok.
Those steps are already included, still does it report as "failed with error 401"
Hm, what the hell, I get the same issue in FileMaker Server 10 aswell now...now if any subscript have a Go to next record (Exit after last record)
Yes, it's a stupid non-error that I certainly hope FMS 12 will ignore with "set error capture on", but for now, a simple workaround is this - avoid finds that return 0 records. For example, we're running a server-side script that checks for email records to be sent out every 5 minutes. The old find step was "omit sent_flag = 1" (i.e. null sent_flag). Since most of the time none are found, it always looks like the script fails. So I changed it to find "sent_flag=1", which always succeeds, then added a "show omitted" step after that, followed by "if( get(foundcount)). Voila! No more errors in the FMS Admin Console.
If you can't come up with a good "reverse find", you could add a test for the validity of records in a relationship before you do the find, or use "Go to Related Record".
Maybe you can just add a simple do nothing script step or two after the find.
Using FMS 10, my script routinely hits a no records found--which is logged as an error--but reports the script status as "OK" not as "Failed". Perhaps the difference is that my scripts do many other operations after these finds before they finally terminate.