Thanks Enrico, apologies for the delayed response. I have implemented the changes you suggested and I am still getting the HyperEvent JS exception, but now it just says - SyntaxError: Invalid or unexpected token.
The weird part is, the objectscript code is executing and downloading the file from the SFTP as expected, just catching the HyperEvent exception as well, which seems odd to me.
Thanks for all you help so far, and hopefully you may be able to help further.
I do, in this case, the code is -
Set sc = sftp.Get(remoteFile, localFile, "0666")
If $$$ISERR(sc) {
Write "Error downloading file: ", fileName, !
} else {
Write "File Successfully Downloaded", fileName, !
}
However, if I remove the Write commands, this error goes through every Write command and I am not sure how else to log this for debugging issues.
Hi Enrico,
Apologies for the code dump below but please have a look and let me know if anything looks particularly out of place or incorrect. I have excluded the HTML <head> as don't think it is particularly relevant.