Select to view content in your preferred language

Proxy Error. Code: 400 Unable to Complete Operation

3070
2
Jump to solution
06-21-2014 11:11 AM
charlescraige
Deactivated User
I am am having trouble using the PHP proxy I obtained from the gethub site. After modifying the basic service area example, to call my proxy according to a rule, I receive the error( code: 400, message: "Unable to complete operation.", details: Array[1], log: undefined...).

I am at a loss for what the issue is. The proxy rule is functioning and the proxy itself is functioning based on the log file (getting a token). I am using WAMP Server for testing. Attached are examples of the code.
0 Kudos
1 Solution

Accepted Solutions
BjornSvensson
Esri Regular Contributor
My guess is that the error is coming from the service (not the proxy), so might not be an issue with how you configured the proxy.

You can get this error back from the actual service (not the proxy), if for example you click where that sample service does not have data coverage, like in the ocean or outside the US. http://sampleserver3.arcgisonline.com/ArcGIS/rest/services/Network/USA/NAServer only covers USA...

What does the detailed error say?

View solution in original post

0 Kudos
2 Replies
BjornSvensson
Esri Regular Contributor
My guess is that the error is coming from the service (not the proxy), so might not be an issue with how you configured the proxy.

You can get this error back from the actual service (not the proxy), if for example you click where that sample service does not have data coverage, like in the ocean or outside the US. http://sampleserver3.arcgisonline.com/ArcGIS/rest/services/Network/USA/NAServer only covers USA...

What does the detailed error say?
0 Kudos
charlescraige
Deactivated User
I had actually modified the service area link to be called from: https://route.arcgis.com/arcgis..... as listed in the resources page. Changing it back to the http://sampeserver3.arcgisonline.com.... resulted in a successful run, proxy working and returning a service area. Going back to the route.arcgis, I dug into the error a little more and found a line stating "attribute 'length' not found". I had specified a length parameter previously because ultimately that is the service area type I will need, one based on miles/kilometers and not time. I removed this and the service worked.

The problem was how I defined the length attribute. In http://sampeserver3.arcgisonline.com.... the distance attribute was defined as params.impedanceAttribute = "Length"; which seemed to be working correctly in that instance, but perhaps that attribute was just being ignored. For the  https://route.arcgis.com/arcgis..... it should have been defined as ..."Miles";.

I'm relatively new to JavaScript/Web Development in general so thanks for suggesting to check the detailed error.
0 Kudos