Working with Scripts : Script samples : CLI scripts : Error Messages
 
Error Messages
Most error messages you will see are regular FortiGate CLI error messages. If you are familiar with the CLI you will likely recognize them.
Other error messages indicate your script encountered problems while executing, such as:
command parse error - It was not possible to parse this line of your script into a valid FortiGate CLI command. Common causes for this are misspelled keywords or an incorrect command format.
unknown action - Generally this message indicates the previous line of the script was not executed, especially if the previous line accesses an object such as “config router static”.
Device XXX failed-1 - This usually means there is a problem with the end of the script. XXX is the name of the FortiGate unit the script is to be executed on. If a script has no end statement or that line has an error in it you may see this error message. You may also see this message if the FortiGate unit has not been synchronized by deploying its current configuration.