Switching users

We are using the system.security.switchUser function to switch users. In case the function fails, we put this in a try…except block, but the following error is still raised:GatewayException: Gateway Error 302: Login failed.Why are we not able to catch this error? We are running on Ignition v7.2.3.

This is an oversight on our part. I’ve altered this function so that going forward you can specify a [tt]hideError=1[/tt] parameter on it so suppress the error message, and you can check for a return value of zero to see if it failed.