My Business
2.8K members online now
2.8K members online now
For developers who are using the Google My Business API to manage locations
Guide Me
star_border
Reply

Internal error encountered for drivingDirectionsRequest

[ Edited ]
Visitor ✭ ✭ ✭
# 1
Visitor ✭ ✭ ✭

Hello,

 

 

 

Based on the documentation given to us, we can batch up to 10 locations when making a reportInsights request. However, I have started encountering an issue where I keep getting an INTERNAL ERROR when I make a request with more than one location.

 

When I make the following request, I get the response shown: 

REQUEST
{
	"drivingDirectionsRequest" : {
		"numDays" : "NINETY"
	},
	"locationNames":[
		"accounts/104750222087318028557/locations/14470568165928511124",
		"accounts/104750222087318028557/locations/14208565189194062616",
		"accounts/104750222087318028557/locations/12693228246015979482",
		"accounts/104750222087318028557/locations/15397297095682298846",
		"accounts/104750222087318028557/locations/12718999939468518546",
		"accounts/104750222087318028557/locations/11699598439668370558",
		"accounts/104750222087318028557/locations/15741081674232269659",
		"accounts/104750222087318028557/locations/3429663284421353611",
		"accounts/104750222087318028557/locations/15327390140680229506",
		"accounts/104750222087318028557/locations/9131048265378477925"
	]
}


RESPONSE
{
  "error": {
    "code": 500,
    "message": "Internal error encountered.",
    "status": "INTERNAL"
  }
}

However, when I remove all but the first location when making the request, I see the following:

REQUEST
{
	"drivingDirectionsRequest" : {
		"numDays" : "NINETY"
	},
	"locationNames":[
		"accounts/104750222087318028557/locations/14470568165928511124"
	]
}

RESPONSE
{
  "locationDrivingDirectionMetrics": [
    {
      "locationName": "accounts/104750222087318028557/locations/14470568165928511124",
      "topDirectionSources": [
        {
          "dayCount": 90,
          "regionCounts": [
            {
              "latlng": {
                "latitude": 36.1699412,
                "longitude": -115.13982960000001
              },
              "label": "Las Vegas",
              "count": "183360"
            },
            {
              "latlng": {
                "latitude": 36.128561000000005,
                "longitude": -115.17112979999997
              },
              "label": "89109",
              "count": "82407"
            },
            {
              "latlng": {
                "latitude": 36.1697096,
                "longitude": -115.12369519999999
              },
              "label": "89101",
              "count": "19182"
            },
            {
              "latlng": {
                "latitude": 36.076517599999995,
                "longitude": -115.15334259999999
              },
              "label": "89119",
              "count": "18923"
            },
            {
              "latlng": {
                "latitude": 36.192284099999995,
                "longitude": -115.15927180000001
              },
              "label": "89106",
              "count": "11853"
            },
            {
              "latlng": {
                "latitude": 36.1462673,
                "longitude": -115.18298729999998
              },
              "label": "89102",
              "count": "11128"
            },
            {
              "latlng": {
                "latitude": 36.110412499999995,
                "longitude": -115.20670109999999
              },
              "label": "89103",
              "count": "7018"
            },
            {
              "latlng": {
                "latitude": 36.1988592,
                "longitude": -115.1175013
              },
              "label": "North Las Vegas",
              "count": "6475"
            },
            {
              "latlng": {
                "latitude": 36.211081899999996,
                "longitude": -115.07305629999998
              },
              "label": "Sunrise Manor",
              "count": "6009"
            },
            {
              "latlng": {
                "latitude": 36.778261,
                "longitude": -119.41793240000001
              },
              "label": "California",
              "count": "7737"
            }
          ]
        }
      ],
      "timeZone": "America/Los_Angeles"
    }
  ]
}

The endpoint I am hitting is: 

https://mybusiness.googleapis.com/v3/accounts/104750222087318028557/locations:reportInsights

Any insight into why this is the expected behavior would be great. 

Thanks,
Vishal

 

1 Expert replyverified_user

Internal error encountered for drivingDirectionsRequest

Visitor ✭ ✭ ✭
# 2
Visitor ✭ ✭ ✭

Bumping this post!

Re: Internal error encountered for drivingDirectionsRequest

Google Employee
# 3
Google Employee

Hi @Vishal J,

 

This error usually occurs when web server is unable to handle the HTTP request due to a temporary overloading or for larger more complex requests. In your case, you most likely exceeded the Usage Limits of 5 queries per second (QPS) per project when making the http requests via the Google My Business API. Please try to limit your API usage to 5 queries per second (QPS) per project when sending requests to avoid this error. For more information about rate limit restrictions on the Google My Business API, please check out this section in the FAQ.

 

We are trying to investigate this issue in more detail and we’ll get back to you soon. Thanks for your patience!

 

Thanks,

Shalini, Google My Business API team

Internal error encountered for drivingDirectionsRequest

Visitor ✭ ✭ ✭
# 4
Visitor ✭ ✭ ✭

Hi Shalini,

 

Thank you for getting back to me about this. I figured that it could have been a rate limit issue so I made sure to test these requests manually so as to not be exceeding the 5 QPS threshold. 

 

Please let me know once you are able to investigate this any further.

 

Thanks,

Vishal

Re: Internal error encountered for drivingDirectionsRequest

Google Employee
# 5
Google Employee

Hi @Vishal J,

 

We investigated your issue and haven't been able to reproduce a 500 for driving insights, 10 locations/90 days. Please confirm us if is this a continued error with this set of locations, or was it transient?

 

Thanks,

Shalini, Google My Business API team

Internal error encountered for drivingDirectionsRequest

Visitor ✭ ✭ ✭
# 6
Visitor ✭ ✭ ✭

Hi Shalini,

 

I just tried making this request again and got the same error, I still have not been able to get data for this particular case unless I make each request individually. 

 

To be clear, this is not an issue I am facing with every set of batched locations but there are definitely a few that I am seeing this issue with.

 

Thanks,

Vishal

Internal error encountered for drivingDirectionsRequest

Visitor ✭ ✭ ✭
# 7
Visitor ✭ ✭ ✭

Bumping this issue, any update here?

Re: Internal error encountered for drivingDirectionsRequest

Google Employee
# 8
Google Employee

Hi @Vishal J,

 

Thank you for clarifying the issue. We're still working on improvements to our driving directions insights for the Google My Business API. 

 

Thanks,

The Google My Business API team

Internal error encountered for drivingDirectionsRequest

Visitor ✭ ✭ ✭
# 9
Visitor ✭ ✭ ✭

Hi Shalini,

 

Thank you for letting me know, wondering if there was any update on your end regarding this issue? If not, would you be able to give me some sort of timeline/ETA regarding this? Thank you for the support!

 

Regards,

Vishal

Re: Internal error encountered for drivingDirectionsRequest

[ Edited ]
Google Employee
# 10
Google Employee

Hi @Vishal J

 

Unfortunately, I don’t have any update on this yet. I'll let you know as soon as they have an update for us. Thanks for your patience!

 

Thanks,

Shalini, Google My Business API team