--
-- You received this message because you are subscribed to the Google Groups AdWords Scripts Forum group. Please do not reply to this email. To post to this group or unsubscribe please visit https://developers.google.com/adwords/scripts/community.
---
You received this message because you are subscribed to the Google Groups "Google Ads Scripts Forum" group.
To unsubscribe from this group and stop receiving emails from it, send an email to adwords-scrip...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/adwords-scripts/28928169-3790-4e43-add5-b79e54c7a913n%40googlegroups.com.
|
||||||
if (options.validCodes.indexOf(responseCode) !== -1) {
if (options.useSimpleFailureStrings &&
bodyContainsFailureStrings(response, options.failureStrings)) {
responseCode = 'Failure string detected';
} else if (options.useCustomValidation && !isValidResponse(url,
response, options, entityDetails)) {
responseCode = "Custom validation failed";
to this:
if (options.validCodes.match(responseCode) !== -1) {
if (options.useSimpleFailureStrings &&
bodyContainsFailureStrings(response, options.failureStrings)) {
responseCode = 'Failure string detected';
} else if (options.useCustomValidation && !isValidResponse(url,
response, options, entityDetails)) {
responseCode = "Custom validation failed";
or do I just replace any iteration of "indexOf()" with "match()"?function bodyContainsFailureStrings(response, failureStrings) { var contentText = response.getContentText() || ''; // Whilst searching for each separate failure string across the body text // separately may not be the most efficient, it is simple, and tests suggest // it is not overly poor performance-wise. return failureStrings.some(function(failureString) { //return contentText.indexOf(failureString) !== -1; if ((contentText.match(failureString)) !== null) { return failureStrings; } }); }
|
||||||
Hi Sven,
For us to have a closer look, could you please provide the following details via Reply privately to author option?
- CID
- Script Name
- Shareable link of the spreadsheet being used in the script
- Sample data that I could test
In case you encounter an error when using the mentioned option, you can send the requested information on this email (googleadsscripts-support@google.com) instead, then let us know here once sent.