Stay organized with collections
Save and categorize content based on your preferences.
You can debug your Community Connector in two ways:
Enabling extended error messages
Logging relevant execution data
This guide outlines how to make effective use of these capabilities.
Enabling/disabling debug features
isAdminUser() should return true if the current user should see debug
messages and stack traces. If isAdminUser() returns false, or is not defined,
and an error occurs, the user will see a generic error message.
Debugging Tips
Design isAdminUser() so it always returns true for developers.
Use getEffectiveUser() in combination with an email safelist of trusted
users to easily add or remove users that should see the full error details.
This can be especially useful if a user runs into an error that you have
trouble reproducing.
Make liberal use of newDebugError() for invariants that should hold
true. This can help with narrowing down problems in the future.
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Missing the information I need","missingTheInformationINeed","thumb-down"],["Too complicated / too many steps","tooComplicatedTooManySteps","thumb-down"],["Out of date","outOfDate","thumb-down"],["Samples / code issue","samplesCodeIssue","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2024-09-18 UTC."],[[["Community Connectors can be debugged by enabling extended error messages or logging execution data."],["`isAdminUser()` function controls debug message visibility, returning `true` for users who should see them and `false` otherwise."],["Leverage Apps Script's logging mechanisms, such as the built-in Logger, Stackdriver, or even a Google Sheet, to proactively identify and resolve bugs while protecting user data privacy."],["Designing `isAdminUser()` to always return `true` for developers and using `getEffectiveUser()` with a safelist can aid in debugging and reproducing user errors."]]],[]]