Yes, I agree -- the error returned does not indicate the actual problem.
FMS' stability seems very fragile.
These unhelpful error messages are a Claris issue!
All my code does is return the error FMP/S returns to it. This was the same error regardless of the approach used to access the database (either a third-party query tool like Data Grip, or programmatic Java code.)
FWIW I'm pretty sure I read that the latest FMP and FMP server have the ability to recover from the 19.2 lockout bug... not sure if that's what you got or not, but it's possible restarting triggered whatever script checks for the error and fixes it. I added a script to all my clients that turns off the menu on Filemaker 19.2 clients since going into the preferences can corrupt the database.