UNEXPECTED_INTERNAL_API_ERROR

66 views
Skip to first unread message

alejandro...@quanticmind.com

unread,
Nov 9, 2017, 5:22:39 AM11/9/17
to AdWords API Forum
We are receiving an InternalApiError.UNEXPECTED_INTERNAL_API_ERROR on multiple requests to the API, most of them against CustomerFeedServiceInterfacePort.
Here are the SOAP Request and the SOAP Response

Can you please help us to diagnose what's happening?
Thanks, Alejandro

2017-11-08 19:27:04,987 [utionStrategy-1] INFO    c.g.a.a.a.l.c.A.requestInfoLogger  - Request made: Service: "CustomerFeedServiceInterfacePort" Method: "get" URL: "https://adwords.google.com/api/adwords/cm/v201705/CustomerFeedService" Request ID: "null" 
2017-11-08 19:27:04,996 [utionStrategy-1] WARN        c.g.a.a.a.l.c.A.soapXmlLogger  - SOAP Request:
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
    <soapenv:Header>
        <ns1:RequestHeader xmlns:ns1="https://adwords.google.com/api/adwords/cm/v201705" soapenv:mustUnderstand="0">
            <ns1:clientCustomerId>REDACTED</ns1:clientCustomerId>
            <ns1:developerToken>REDACTED</ns1:developerToken>
            <ns1:userAgent>iv (AwApi-Java, AdWords-Axis/3.4.0, Common-Java/3.4.0, Axis/1.4, Java/1.8.0_112, maven)</ns1:userAgent>
            <ns1:validateOnly>false</ns1:validateOnly>
            <ns1:partialFailure>false</ns1:partialFailure>
        </ns1:RequestHeader>
    </soapenv:Header>
    <soapenv:Body>
            <selector xmlns:ns2="https://adwords.google.com/api/adwords/cm/v201705" xsi:type="ns2:Selector">
                <ns2:fields xsi:type="xsd:string">FeedId</ns2:fields>
                <ns2:fields xsi:type="xsd:string">MatchingFunction</ns2:fields>
                <ns2:fields xsi:type="xsd:string">PlaceholderTypes</ns2:fields>
                <ns2:fields xsi:type="xsd:string">Status</ns2:fields>
                <ns2:predicates xsi:type="ns2:Predicate">
                    <ns2:field xsi:type="xsd:string">Status</ns2:field>
                    <ns2:operator xsi:type="ns2:Predicate.Operator">IN</ns2:operator>
                    <ns2:values xsi:type="xsd:string">ENABLED</ns2:values>
                    <ns2:values xsi:type="xsd:string">REMOVED</ns2:values>
                </ns2:predicates>
                <ns2:paging xsi:type="ns2:Paging">
                    <ns2:startIndex xsi:type="xsd:int">0</ns2:startIndex>
                    <ns2:numberResults xsi:type="xsd:int">0</ns2:numberResults>
                </ns2:paging>
            </selector>
        </get>
    </soapenv:Body>
</soapenv:Envelope>
 
2017-11-08 19:27:04,996 [utionStrategy-1] WARN        c.g.a.a.a.l.c.A.soapXmlLogger  - SOAP Response:
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">
    <soap:Body>
        <soap:Fault>
            <faultcode>soap:Server</faultcode>
            <faultstring>InternalApiError.UNEXPECTED_INTERNAL_API_ERROR @ com.google.ads.api.services.common.error.InternalApiError.&lt;init&gt;(InternalApiErro</faultstring>
            <detail>
                <ApiExceptionFault xmlns="https://adwords.google.com/api/adwords/cm/v201705">
                    <message>InternalApiError.UNEXPECTED_INTERNAL_API_ERROR @ com.google.ads.api.services.common.error.InternalApiError.&lt;init&gt;(InternalApiErro</message>
                    <ApplicationException.Type>ApiException</ApplicationException.Type>
                    <errors xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:type="InternalApiError">
                        <fieldPath/>
                        <trigger/>
                        <errorString>InternalApiError.UNEXPECTED_INTERNAL_API_ERROR</errorString>
                        <ApiError.Type>InternalApiError</ApiError.Type>
                        <reason>UNEXPECTED_INTERNAL_API_ERROR</reason>
                    </errors>
                </ApiExceptionFault>
            </detail>
        </soap:Fault>
    </soap:Body>
</soap:Envelope>

Shwetha Vastrad (AdWords API Team)

unread,
Nov 9, 2017, 1:21:18 PM11/9/17
to AdWords API Forum
Hi,

Do you consistently encounter the InternalApiError? Could you tell me if this error is seen with just this service or other services as well? This error is usually related to temporary resource related issues in the AdWords API server and retrying the request should help in getting a successful response. Could you also send over the clientCustomerIds for which you encountered this error? Please use the Reply privately to author option when responding.

Thanks,
Shwetha, AdWords API Team.

Josh Radcliff (AdWords API Team)

unread,
Nov 16, 2017, 9:49:12 AM11/16/17
to AdWords API Forum
Hi,

I noticed that in your request, you are specifying the following in the paging element:

                    <ns2:startIndex xsi:type="xsd:int">0</ns2:startIndex>
                    <ns2:numberResults xsi:type="xsd:int">0</ns2:numberResults>

The numberResults should be a value > 0, as it indicates how many results you want returned in each response (page). Could you try changing that value and let me know if you still encounter the error?

Thanks,
Josh, AdWords API Team

alejandro...@quanticmind.com

unread,
Nov 16, 2017, 4:31:20 PM11/16/17
to AdWords API Forum
Hi,

According to the link you sent, the field (numberResults) must be greater than or equal to 0. 
Beyond that, i changed the value to use 100 (instead of 0) and i still get the same error.

Thanks,
Alejandro

Josh Radcliff (AdWords API Team)

unread,
Nov 17, 2017, 9:41:22 AM11/17/17
to AdWords API Forum
Hi Alejandro,

Sorry, my mistake. :) What I was thinking was that there's not much point to setting numberResults = 0 in most cases, but I completely forgot about the use case of simply getting the count of objects that match the predicate you specified (e.g., from totalNumEntries), where numberResults=0 makes sense.

The underlying error on those requests are timeouts while reading data from your account. This can happen for a variety of reasons, including if there is a particularly high volume of requests against a particular account within a short time window. For example, on Nov 16, I see that anywhere from 200 to 9,000 requests per hour were issued against that account between 13:00 and 18:00 Pacific time.

In this situation, your best bet is to simply retry the request using some sort of retry policy (e.g., exponential backoff).

Thanks,
Josh, AdWords API Team
Reply all
Reply to author
Forward
0 new messages