Jump to content
Claris Engage 2025 - March 25-26 Austin Texas ×

How to prevent "scripting error (401)" in server log?


This topic is 2853 days old. Please don't post here. Open a new topic instead.

Recommended Posts

Posted

I doubt many people care about this, but I'm annoyed that my Server Script is throwing errors in the server Log Viewer (under the Server Events module).  Specifically, error 401 (No records match the request) and 101 (Record is missing).  Even if I have Set Error Capture [On] in there and capture the error code using Get(LastError), FileMaker Server still throws an accusing finger at me and says "scripting error"!

 

It'd be nice to eliminate error warnings like this so I can focus on real errors that I care about.

 

I'm running FileMaker Server 12 Advanced (12.0.4.405).

 

scripting_error.gif

Posted

Do an ExecuteSQL to do a quick select, if that comes up empty you can skip the real FM find.


It's important to understand though that "Set Error Capture On" does not prevent the error from *happening*.  The only thing it does is hide the error from the user so that you can handle it silently.

If you run the same script in your debugger you will see that FM also reports the error.

  • Like 4
Posted

Ahh, but that would require me to learn the Execute SQL script step!  ;)  Interesting tip; I may try that out.

 

As for capturing errors, I knew that errors were still reported, but I wasn't sure if it was germane to the issue at hand.

  • 3 years later...

This topic is 2853 days old. Please don't post here. Open a new topic instead.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.