I have developed a Google Workspace Add-on (published from a standalone Apps Script project) that relies on making an external API call for verification and event logging. The app works perfectly when tested locally and in my test environments using the Library link method.
The app was rejected by the Google Workspace Marketplace (GWM) Review Team due to a "Functionality" issue. The only error feedback provided is a generic "Add-on error: Something went wrong when executing the add-on."
I suspect the issue is related to the external network call failing within Google's testing environment (e.g., firewall/proxy restrictions or domain TLD blocking).
1. Core Functionality
The main logic involves calling a verification endpoint from the sidebar submission using UrlFetchApp.fetch().
2. Relevant Code Snippet (Error Handling)
I have implemented extensive error handling using try...catch and muteHttpExceptions: true. This function is where the GWM test likely fails:
// This is the function called from the sidebar
function processSidebarData(formData) {
const verifyUrl = "[https://gateway.smit.team/webhook/google-sheet/verify-code](https://gateway.smit.team/webhook/google-sheet/verify-code)";
try {
const payload = { ...formData }; // Payload structure defined by me
const options = {
method: "post",
payload: JSON.stringify(payload),
contentType: "application/json",
muteHttpExceptions: true // To catch non-200 responses
};
const response = UrlFetchApp.fetch(verifyUrl, options);
const responseCode = response.getResponseCode();
if (responseCode !== 200) {
// Handles 4xx/5xx responses. Returns error message to the user.
Logger.log(`Server Error: HTTP ${responseCode}`);
return { success: false, message: "Verification API returned an error." };
}
const result = JSON.parse(response.getContentText());
if (result.success) {
// Success, proceeds to install trigger
installOnEditTrigger();
return { success: true, message: "Configuration successful." };
} else {
// Handles API business logic errors
return { success: false, message: result.message || "Invalid code." };
}
} catch (e) {
// THIS BLOCK SHOULD CATCH NETWORK/SSL/GENERAL FAILURES
Logger.log('Network/API Execution Error: ' + e.message);
// Returns a general failure message to the sidebar
return { success: false, message: "A network or system error occurred. Please try again." };
}
}
Given the generic "Add-on error," is it highly likely that the failure is an unhandled exception outside of the try...catch block, or is it a specific network block that even a comprehensive try...catch cannot properly log?
How can I remotely diagnose or get the specific Stack Trace or the exact exception message (e.g., related to SSL/firewall) that Google's testing environment encountered?
Are there known issues with Google's testing proxies blocking outbound connections to external TLDs like .team?