Debug your Community Connector

You can enable Community Connector debug features to view execution error details in Data Studio during runtime. You can also setup Apps Script logging using different methods.

Enabling/disabling debug features

You can use the isAdminUser() function to to enable detailed error messages while testing your Community Connector.

The isAdminUser() function should return a boolean value to indicate whether the current user is an admin user of the connector. If it returns true, it will indicate that the current user is an admin user of the connector. If isAdminUser() function is not defined or returns false, it implies that the current user is not an admin user of the connector.

Data Studio makes use of isAdminUser() to provide debug information to the current user. When Data Studio encounters an error during connector execution, it calls the isAdminUser() function to check whether the current user is an admin user of the connector or not. If isAdminUser() returns true, Data Studio will show the execution errors to the user. If isAdminUser() function is not defined or returns false, the current user will not see the details of the error other than a generic error message.

Design isAdminUser() function in such a way so that it returns true during development phase or while you (the developer) or some other trusted user is using the Community Connector. You might want to maintain an email whitelist of trusted users and make use of the getEffectiveUser() function in Apps Script.

Apps Script logging

Apps Script provides different mechanisms for logging including built-in Apps Script Logger, Stackdriver Logging, and Stackdriver Error Reporting. You can also try logging to a Google Sheet.