Repository navigation
[SDK-715] Mark network failures on API responses - #1114
Open
franco-zalamena-iterable wants to merge 1 commit into
Open
franco-zalamena-iterable wants to merge 1 commit into
franco-zalamena-iterable wants to merge 1 commit into
Conversation
This was referenced Nov 23, 2026
An IOException from the request is marked as a network failure when it is a timeout, DNS failure, socket error or EOF, or has an EOF or socket error in its cause chain, which is how devices report a dropped connection, including a TLS handshake closed by the server. Other I/O, TLS and invalid-URL failures are not marked. Only the network retry policy will read the marker; the legacy retry loop ignores it. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
franco-zalamena-iterable
force-pushed
the
feature/SDK-715-c1-network-failure
branch
from
November 26, 2026 10:36
fcf9119 to
597d4be
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
📝 Summary
Adds a network failure marker to API responses and classifies which I/O errors count as network failures. Only tests read it for now.
🎟️ Jira Ticket: SDK-715
Epic: SDK-454
Stack, in order: #1111 (SDK-714), #1112, #1113, #1114, #1115. This is #1114.
📖 Description
Today every client side failure is reported as code 0, so the retry policy can't tell a timeout from a bad URL. This PR adds a
networkFailureflag onIterableApiResponseand sets it when the request fails with a network error.IterableNetworkRetryClassifier.isNetworkFailuretreats timeouts, DNS failures, connection and socket errors and EOF as network failures. It also follows the cause chain, since on devices a dropped connection often comes as a plain IOException caused by an EOF or socket error. That covers TLS errors caused by a socket reset too. Other I/O errors, other TLS errors and bad URLs stay as plain code 0 failures.Nothing in the request flow reads the flag yet, the legacy retry loop ignores it and a test pins that. It starts being used in #1115.
🧪 How to test?
./gradlew :iterableapi:testDebugUnitTestgives 846 tests, 21 skipped and 0 failures. Checkstyle, lint and the androidTest compile are green. TheIterableRequestTaskTestcases use real refused, dropped and timed out connections, plus a test URL handler for the dropped case.🧾 Changelog
No customer facing changes
🤖 Generated with Claude Code