When multiple users are accessing the application, how do you know which user's operation caused the error?

In addition to the errors displayed on the front-end client, errors are also recorded in the Web API's logs.

However, the error log only contains the Session ID and no specific user information. It is impossible to directly know which user's operation caused the error.

It is recommended to record the Session ID in the application to facilitate analysis with error logs.

For example:

After the user login, obtain and store the user ID and the Session ID to the database table. This way, when an error occurs, you can troubleshoot the problem more easily based on the Session ID.

To get the Session ID

String ls_SessionID
ls_SessionID = Getapplication().GetSessionID()