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

Disable api calls #851

Merged
merged 13 commits into from
Dec 16, 2024
Merged

Disable api calls #851

merged 13 commits into from
Dec 16, 2024

Conversation

DordeDimitrijev
Copy link
Contributor

@DordeDimitrijev DordeDimitrijev commented Nov 14, 2024

Description

Implemented feature for stopping api calls from being sent after unsuccessful response. This behavior is aligned with other appcenter SDKs. Disabling of api calls occurs only per session after first failed request.

Related PRs or issues

AB#107980

src/test/acquisition-sdk.ts Outdated Show resolved Hide resolved
src/script/acquisition-sdk.ts Outdated Show resolved Hide resolved
src/script/acquisition-sdk.ts Outdated Show resolved Hide resolved
src/script/acquisition-sdk.ts Outdated Show resolved Hide resolved
src/script/acquisition-sdk.ts Outdated Show resolved Hide resolved
src/script/acquisition-sdk.ts Outdated Show resolved Hide resolved
src/script/acquisition-sdk.ts Outdated Show resolved Hide resolved
src/test/acquisition-sdk.ts Show resolved Hide resolved
src/script/acquisition-sdk.ts Outdated Show resolved Hide resolved
@DordeDimitrijev DordeDimitrijev marked this pull request as ready for review November 19, 2024 08:39
@DordeDimitrijev DordeDimitrijev requested a review from a team as a code owner November 19, 2024 08:39
src/script/acquisition-sdk.ts Outdated Show resolved Hide resolved
src/script/acquisition-sdk.ts Outdated Show resolved Hide resolved
src/script/acquisition-sdk.ts Show resolved Hide resolved
src/script/acquisition-sdk.ts Outdated Show resolved Hide resolved
src/script/acquisition-sdk.ts Outdated Show resolved Hide resolved
src/test/acquisition-sdk.ts Show resolved Hide resolved
src/test/acquisition-sdk.ts Show resolved Hide resolved
src/script/acquisition-sdk.ts Show resolved Hide resolved
src/test/acquisition-sdk.ts Outdated Show resolved Hide resolved
src/test/acquisition-sdk.ts Outdated Show resolved Hide resolved
src/test/acquisition-sdk.ts Show resolved Hide resolved
src/test/acquisition-rest-mock.ts Show resolved Hide resolved
src/test/acquisition-rest-mock.ts Show resolved Hide resolved
src/test/acquisition-rest-mock.ts Outdated Show resolved Hide resolved
src/test/acquisition-sdk.ts Show resolved Hide resolved
src/test/acquisition-sdk.ts Outdated Show resolved Hide resolved
src/test/acquisition-sdk.ts Show resolved Hide resolved
@IlyaBausovAkvelon
Copy link

I've built and tested this PR on my machine. Everything seems fine.

src/script/acquisition-sdk.ts Outdated Show resolved Hide resolved
src/script/acquisition-sdk.ts Outdated Show resolved Hide resolved
@@ -80,7 +82,21 @@ export class AcquisitionManager {
this._ignoreAppVersion = configuration.ignoreAppVersion;
}

private isRecoverable = (statusCode: number): boolean => statusCode >= 500 || statusCode === 408 || statusCode === 429;
Copy link
Contributor

Choose a reason for hiding this comment

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

You check this when response code is not 200 - what about other 2xx or 3xx responses - are they recoverable or not?

@DordeDimitrijev DordeDimitrijev merged commit c7bf0eb into master Dec 16, 2024
2 checks passed
@DordeDimitrijev DordeDimitrijev deleted the disable-api-calls branch December 16, 2024 11:14
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.

4 participants