[v2009] How to determine which ad caused a policy violation

22 views
Skip to first unread message

ste...@smecsells.com

unread,
Sep 24, 2009, 10:12:59 AM9/24/09
to AdWords API Forum
Say I'm adding multiple ads to an ad group, and a policy violation
error occurs. Is there a simple possibility to determine which ad the
error relates to, other than inspecting the OGNL expression?

AdWords API Advisor

unread,
Sep 24, 2009, 12:08:38 PM9/24/09
to AdWords API Forum
Hi,

In the v2009 API the OGNL expression was provided for that very
purpose. You may also be able to glean some information about the
offending object by looking at the trigger field of the error.

Best,
- Eric Koleda, AdWords API Team

On Sep 24, 10:12 am, "stel...@smecsells.com" <stel...@smecsells.com>
wrote:

Alex

unread,
Oct 12, 2009, 4:15:11 PM10/12/09
to AdWords API Forum
I'm trying to migrate our code to use the v2009 API, and I must say,
that I'm finding OGNL expressions too bulky for error reporting. I
also can't imagine a use case, that you had in mind for the OGNL
expression. Most of the time we want to know only the index of the
item, that caused the fault, so that we can retry the remaining items.
The extra information is useful, but most of the time will have to be
manually reviewed anyway (e.g. whether an exemption request should be
filed, or whether the keyword is junk).

I haven't been able to find any examples of error handling in your
Java code samples for v2009. I have been using the regexp "operations\
[(\d+)\]" to find the index of the failed item. Is this a good way to
do so, or is there a better way to achieve this?

Alex

On Sep 24, 9:08 am, AdWords API Advisor <adwordsapiadvi...@google.com>
wrote:
> Hi,
>
> In thev2009API the OGNL expression was provided for that very
> purpose.  You may also be able to glean some information about the
> offending object by looking at the trigger field of theerror.
>
> Best,
> - Eric Koleda, AdWords API Team
>
> On Sep 24, 10:12 am, "stel...@smecsells.com" <stel...@smecsells.com>
> wrote:
>
> > Say I'm adding multiple ads to an ad group, and a policy violation
> >erroroccurs. Is there a simple possibility to determine which ad the
> >errorrelates to, other than inspecting the OGNL expression?

AdWords API Advisor

unread,
Oct 13, 2009, 2:17:59 PM10/13/09
to AdWords API Forum
Hi Alex,

Thanks for the feedback on OGNL. It's a new addition to the AdWords
API, and it's useful to hear developers' experience with it.

As for parsing it, I think your regular expression is a good start.
The full spec of the language can be found here:

http://www.opensymphony.com/ognl/html/LanguageGuide/index.html.

If you are using Java, you may want to download their library, which
has methods to parse OGNL expressions:

http://mirrors.ibiblio.org/pub/mirrors/maven2/ognl/ognl/

The javadocs for that library can be found here:

http://www.opensymphony.com/ognl/api/

I'll talk with the team to see if we can add some OGNL parsing or
handling in our examples.

Best,
- Eric
Reply all
Reply to author
Forward
0 new messages