I have just upgraded to 2017R2 and have moved the code to use the Bing Restful api for the maps.
However, when we calculate a route, we now have to handle two events, the CalculateRouteCompleted and the CalculateRouteError. The problem is that when we get the completed event we have access to the UserData that I sent with the async request (I can then tie the response back to the original request), but with the error event we just get the exception that is returned from Bing (a less than helpful bad request). Is there a reason why we don't also get the UserData back?
My scenario is that I asynchronously send off searches to create a drive zone around a point. Before, I would send off say 16 requests and even if they are bad requests (e.g. they are in the sea), I would get the result back and I could then adjust the search.
So in summary, how can I link a CalculateRouteError event back to the request that caused it?