Skip to content

Conversation

@jackmisner
Copy link
Owner

@jackmisner jackmisner commented Nov 28, 2025

Summary by CodeRabbit

  • Chores

    • App version updated to 3.2.5
    • Android build version incremented to 190
  • Bug Fixes

    • Improved offline/network error detection to make sync operations more reliable and reduce unnecessary retries during connectivity issues

✏️ Tip: You can customize this high-level summary in your review settings.

@coderabbitai
Copy link
Contributor

coderabbitai bot commented Nov 28, 2025

Walkthrough

Bump from 3.2.4 → 3.2.5 across app/version metadata and Android build config, plus an enhancement in UserCacheService to broaden detection of network/Axios error variants during offline sync handling.

Changes

Cohort / File(s) Summary
Version configuration
android/app/build.gradle, android/app/src/main/res/values/strings.xml, app.json, package.json
Incremented Android versionCode 189→190 and app/package/runtime/versionName 3.2.4→3.2.5 in build config, string resources, Expo manifest, and package metadata.
Offline/network error detection
src/services/offlineV2/UserCacheService.ts
Expanded offline error classification to include additional Axios/network indicators: checks for "Network Error" message variants and axios error codes such as ERR_NETWORK, ECONNREFUSED, ETIMEDOUT, ENOTFOUND, affecting offline detection in sync/error-handling paths.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~10 minutes

  • Version bumps are repetitive and low risk.
  • Logic change is a narrow expansion of conditional checks.

Areas to review:

  • Ensure string/code values ("Network Error", ERR_NETWORK, ECONNREFUSED, ETIMEDOUT, ENOTFOUND) match runtime Axios/Node error semantics.
  • Confirm broadened offline classification doesn't incorrectly suppress non-network errors.

Poem

🐰 A hop from point-four to point-five I bring,
Catching more network whispers on the sync wing.
ERR_NETWORK, ETIMEDOUT, ENOTFOUND in my sight,
I guard the offline path through day and night. 🥕✨

Pre-merge checks and finishing touches

✅ Passed checks (3 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The PR title accurately describes the main change: adding axios error codes to UserCacheService for better network error detection. This is the primary behavioral change in the changeset, with version bumps being secondary.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
✨ Finishing touches
  • 📝 Generate docstrings
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch improve-offline-error-detection

📜 Recent review details

Configuration used: CodeRabbit UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between f0f42ef and 2c8b3be.

📒 Files selected for processing (1)
  • src/services/offlineV2/UserCacheService.ts (1 hunks)
🚧 Files skipped from review as they are similar to previous changes (1)
  • src/services/offlineV2/UserCacheService.ts

Comment @coderabbitai help to get the list of available commands and usage tips.

@jackmisner jackmisner changed the title Add axios error codes to the UserCacheService to hopefully better det… Add axios error codes to the UserCacheService to hopefully better detect when API errors are network related Nov 28, 2025
Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 0

🧹 Nitpick comments (1)
src/services/offlineV2/UserCacheService.ts (1)

2105-2114: Ensure axios ERR_NETWORK is actually present in errorMessage

You’re now treating errors whose message contains "Network Error" or "ERR_NETWORK" as offline, which is good for axios-based failures. However, errorMessage here is just error.message from the thrown SyncError, not the original axios error, so errorMessage.includes("ERR_NETWORK") will only ever be true if your ApiService/SyncError explicitly embed the axios error.code into the message string.

If your intent is to key off axios’ error.code === "ERR_NETWORK", consider either:

  • Ensuring the wrapped error message always includes that code, or
  • Extending this check to also inspect the error object (e.g. (error as any).code === "ERR_NETWORK") in addition to the message.
📜 Review details

Configuration used: CodeRabbit UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 59ddb05 and f0f42ef.

⛔ Files ignored due to path filters (1)
  • package-lock.json is excluded by !**/package-lock.json
📒 Files selected for processing (5)
  • android/app/build.gradle (1 hunks)
  • android/app/src/main/res/values/strings.xml (1 hunks)
  • app.json (3 hunks)
  • package.json (1 hunks)
  • src/services/offlineV2/UserCacheService.ts (1 hunks)
🔇 Additional comments (4)
package.json (1)

4-4: Version bump looks consistent

App version is updated to 3.2.5, matching the rest of the PR’s versioning; nothing else in this manifest changes.

android/app/build.gradle (1)

95-96: Android versionCode/versionName aligned

versionCode 190 and versionName "3.2.5" are in sync with app.json and package.json; Android config looks good.

android/app/src/main/res/values/strings.xml (1)

4-4: Runtime version string matches app config

expo_runtime_version set to 3.2.5 matches the runtimeVersion in app.json; this keeps OTA/runtime in sync.

app.json (1)

6-6: Expo/app/Android versions are coherently bumped

version: "3.2.5", android.versionCode: 190, and runtimeVersion: "3.2.5" are all aligned with the Android Gradle config and package.json; release metadata is consistent.

Also applies to: 19-19, 61-61

@jackmisner jackmisner merged commit 572a4b1 into main Nov 28, 2025
2 checks passed
@jackmisner jackmisner deleted the improve-offline-error-detection branch November 28, 2025 18:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

2 participants