3 Replies Latest reply on Nov 17, 2012 9:21 PM by BowdenData

    Server script error: 401

    jbrown

      Hey all,

      I've done some reading about this error, and I haven't found a way to get around it.

      The script is looking for records that need to be updated and if it doesn't find any, with the help of Error Capture set to ON, the script exits.

       

      But everytimer server runs the script and the record count is 0, I get this error emailed to me.

       

      While I haven't found a solution yet, is it in any way damaging to anything that this script error occurs? I don't know how that could affect any integrity, any records, etc.

       

      Thanks

      jb

        • 1. Re: Server script error: 401
          ariley

          Do you put error trapping before this, to check fo Get Found Count = 0? Cause then you have the control, not the server. If you have no records to update, then you should just bail.

          • 2. Re: Server script error: 401
            jbrown

            Agnes,

            That's what i have in the script. But for some reason, it still says, even when the foundcount is 0, it gives me an error.


            The script says:

            If FoundCount = 0

            Exit Script

             

            I've read that others have had this issue.

            jb

            • 3. Re: Server script error: 401
              BowdenData

              Jeremy Brown wrote:

               

              But everytimer server runs the script and the record count is 0, I get this error emailed to me.

               

              Jeremy,

               

              Sounds like you have the setting in FM server for sending emails set to the higher level of notification on Warnings and Errors instead of the lower level of Errors only. I would suggest that when you are implementing some new server-side scripts or perhaps if you make some mods to existing scripts, it might be useful to have the higher level of notification, but not for regular use. There is no way to avoid the 401 error when doing a find and nothing is found. By the way, a good thing to do is look at the server event log in the FM Admin console. It will show you any errors encountered while a server-side script executes.

               

              HTH.

               

              Doug