Where can I find further info on Unauthorized and TimeoutOccurred responses from Bing Maps REST Routing API?

Jerod 26 Reputation points
2021-09-03T20:18:56.167+00:00

The API request that is giving me troubles is
https://dev.virtualearth.net/REST/v1/Routes/Truck?key=X

We send with points in JSON format.
WPF App
Enterprise / Windows Application Keys

From time to time our customers are getting "Unauthorized" or "TimeoutOccurred" responses from Bing when we send off points to be routed with the above uri.

These errors are not consistent, a user could send off requests all day long and be ok, until it fails randomly. If it does fail, after some amount of time the request will go through successfully again. The data that we send with the request doesn't change, they just can wait for a bit, try again and it works. I've also checked their API keys every time and they are always valid.

I've read up on these errors but I don't even see "TimeoutOccurred" on this page.
https://learn.microsoft.com/en-us/bingmaps/rest-services/status-codes-and-error-handling

So can I get more info on these errors from Bing? Does Bing log these so we can query them or something (grasping at straws here I know). I just want to know why the request failed... sure a "TimeoutOccurred" or they are "Unauthorized", but how come sometimes that identical request will work fine just 5 mins later then?

Any help would be appreciated. I know I don't have many details but I can't replicate these random happenings so I can't get you any more details. Even an idea on how to proceed when I get these errors would be helpful. This stops our users dead in their tracks so telling them "wait a bit and try again" won't cut it.

Windows Maps
Windows Maps
A Microsoft app that provides voice navigation and turn-by-turn driving, transit, and walking directions.
253 questions
0 comments No comments
{count} votes

Accepted answer
  1. IoTGirl 2,976 Reputation points Microsoft Employee
    2021-09-04T16:05:22.607+00:00

    Hi Jerod,

    There are a number of issues that can cause a time out and the support team can work through these with you to get specifics (Microsoft.com/maps > Contact Us > Support > Enterprise Support) The two things they are going to ask you for are the Transaction Trace ID of the call and a wireshark trace of the call. As these are REST APIs they are are finding some folks are leaving ports open too long and a simple close and reopen can mitigate TimeOuts.

    Sincerely,
    IoTGirl

    1 person found this answer helpful.

2 additional answers

Sort by: Most helpful
  1. IoTGirl 2,976 Reputation points Microsoft Employee
    2021-09-07T14:27:00.43+00:00

    Hi Jerod,

    The session key has some limits as well. If you get "Unauthorized" then reloading the control and refreshing the session is probably what you need. The timeout can be a network timeout rather than an actual API call failure but you likely can't catch those without wireshark.

    • If you don't get a trace ID, then the call didn't make it to us and the failure ins in the network connection somewhere before it reaches Microsoft
    • If "retrying the call" means reloading the control that is probably what is fixing up your session

    Sincerely,
    IoTGirl

    1 person found this answer helpful.

  2. IoTGirl 2,976 Reputation points Microsoft Employee
    2021-09-09T23:41:54.72+00:00

    You could only refresh the control when the calls fails rather than hourly... :)

    1 person found this answer helpful.
    0 comments No comments