question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

getService, getLayer should automatically retry failed requests sans authentication

See original GitHub issue

Background

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

cc @rgwozdz @tomwayson

Issue Analytics

  • State:open
  • Created 2 years ago
  • Comments:6 (6 by maintainers)

github_iconTop GitHub Comments

1reaction
andrewctatecommented, Sep 23, 2021

@rgwozdz was under the same impression. The most we could find was the retry method on the ArcGISAuthError 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.

0reactions
patrickarltcommented, Oct 18, 2021

@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.

Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found