Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Introduced retry mechanism for Choreo API endpint request #146

Merged
merged 3 commits into from
Sep 15, 2023

Conversation

Sachin-Mamoru
Copy link
Contributor

@@ -519,7 +548,7 @@ private void handleChoreoEndpointResponse(final HttpResponse response) throws Fr
if (ERROR_CODE_ACCESS_TOKEN_INACTIVE.equals(responseBody.get(CODE))) {
LOG.info("Access token inactive for session data key: " +
authenticationContext.getContextIdentifier());
handleRetryTokenRequest(tokenRequestAttemptCount, OUTCOME_FAIL);
handleRetryTokenRequest(tokenRequestAttemptCount, OUTCOME_FAIL, MAX_TOKEN_REQUEST_ATTEMPTS);

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
handleRetryTokenRequest(tokenRequestAttemptCount, OUTCOME_FAIL, MAX_TOKEN_REQUEST_ATTEMPTS);
handleRetryTokenRequest(tokenRequestAttemptCount, OUTCOME_FAIL, maxTokenRequestAttemptsForTimeOut);

is the variable correct?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Here the retry mechanism is for expired tokens which they had earlier.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That can also be the same as a token timeout retry. IMO expired or timeout retry attempts should be configurable. But for the moment let's keep this.

@Sachin-Mamoru Sachin-Mamoru merged commit f0677f4 into wso2-extensions:master Sep 15, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants