Jump to content
View in the app

A better way to browse. Learn more.

FMForums.com

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

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

Featured Replies

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

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.

  • Author

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...

Or use a relation to check if the found set exists.

prevent401.png

Create an account or sign in to comment

Important Information

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

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.