getService, getLayer should automatically retry failed requests sans authentication
See original GitHub issueBackground
ArcGIS Server tries to validate any token passed in a request whether or not authentication is needed for that request. This can lead to a scenario such as the following:
Bob creates a Feature Service
item on ArcGIS Enterprise for a public feature service on AGOL. The consuming application sends an ArcGIS Enterprise authentication token in requests to the AGOL service. The service tries to validate the token with AGOL and fails, preventing the request from succeeding. If a token is not sent, the request is successful since the service is public.
Solution
A simple and bullet-proof approach to solving this would be to
- Make the request with authentication
- If it fails with an ArcGIS Auth Error, make it again without authentication
Issue Analytics
- State:
- Created 2 years ago
- Comments:6 (6 by maintainers)
Top Results From Across the Web
Issues · Esri/arcgis-rest-js - GitHub
"get Authenticated methods getItemResource defaults to read as blob" error in unit ... getService, getLayer should automatically retry failed requests sans ...
Read more >Retry failed HTTP requests in Angular | by Kevin Kreuzer
We need to be able to decide when retries should be executed. The retry operator is not enough. Let's again consult the RxJs...
Read more >Retry failed requests | IAM Documentation - Google Cloud
Each request to the IAM API can succeed or fail. If your application retries failed requests without waiting, it might send a large...
Read more >Retry failed requests with $http interceptor - angularjs
Note: In this example implementation the interceptor will retry the request until you receive a response with status that is different than 500....
Read more >Retrying failed requests - Ktor
By default, the Ktor client doesn't retry requests that failed due to network or server errors. You can use the HttpRequestRetry plugin to ......
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
@rgwozdz was under the same impression. The most we could find was the
retry
method on theArcGISAuthError
class which is helpful, but doesn’t get us all the way there.Simply put, when I call
getService
and provide authentication it does not automatically try it without authentication.@tomwayson @gavinr @jwasilgeo and I met on this. We can’t decide on the best way forward. There isn’t a good consensus on HOW we should resolve this issue since it is complex and the auth flow is already rather complex.