Errors and Warnings

AdWords scripts execute in best-effort fashion: They attempt to make changes to AdWords data, but if a certain change is not successful, the script records it into Changes log and proceeds with the execution:

// Attempt an invalid change.
// Error is logged into Changes log, but the script keeps running.

// Suppose we must know whether the change actually happened.
if (campaign.getBudget() != -100) {
  // The current value of budget is not the one we expected.
  // The change must have failed.

Other errors, however, cannot be skimmed over:

var keywords = AdWordsApp.keywords()
    .withCondition("Clicks > 10")
    // Forgot forDateRange().

With the above code, the script cannot produce a meaningful keywords iterator, since the date range was not specified. The script execution will halt, and an error message will be logged to the text logs.

Rule of thumb: When AdWords scripts hands you an object, it is safe to work with; an error would occur if fetching of an object failed. When you request an invalid change, the failure will be logged, but the execution will proceed.

Warnings are logged by the script when one of the quotas has been exceeded. The script execution will proceed, but you're advised to carefully review all warnings.

The following screenshot shows how warnings and errors are presented in the user interface:

Send feedback about...

AdWords Scripts
AdWords Scripts
Need help? Visit our support page.