Repository navigation
improve sync error handling - #3396
alperozturk96 wants to merge 7 commits into
Conversation
Not up to standards ⛔🟢 Issues
|
| Metric | Results |
|---|---|
| Complexity | 35 |
| Duplication | 0 |
NEW Get contextual insights on your PRs based on Codacy's metrics, along with PR and Jira context, without leaving GitHub. Enable AI reviewer
TIP This summary will be updated as you push new changes.
|
|
||
| <string name="error_sync">Synchronization failed: %1$s</string> | ||
| <string name="error_synchronization">Synchronization failed</string> | ||
| <string name="error_sync_locked">A note is open in another app. Close it there to sync your changes.</string> |
There was a problem hiding this comment.
@jancborchardt Can you check the messages? Maybe we can provide better wording.
|
APK file: https://github.com/nextcloud/notes-android/actions/runs/38530041575/artifacts/11877942277 |
There was a problem hiding this comment.
🟡 Changes recommended
Failure mapping can produce misleading messages and misses synchronous transport errors.
3 open findings
What changed in this PR
Improves sync-error messaging and extracts remote-note merging from the synchronization task.
Changes:
- Maps sync failures to user-facing messages.
- Refactors push handling and remote-note merging.
- Adds structured sync exceptions.
All four new source files are Kotlin. Among changed files, MainActivity.java and strings.xml remain over 300 lines.
| File | Description |
|---|---|
strings.xml |
Adds sync-error messages. |
SyncFailureReason.kt |
Maps HTTP statuses to failure reasons. |
RemoteNotesMerger.kt |
Extracts remote-note reconciliation. |
NoteSyncException.kt |
Represents failed note operations. |
NotesServerSyncTask.java |
Refactors push, pull, and failure handling. |
SyncErrorMessage.kt |
Selects messages from exceptions. |
MainActivity.java |
Displays specific sync errors. |
🧠 Review effort: Balanced
💡 Configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
|
APK file: https://github.com/nextcloud/notes-android/actions/runs/38557863521/artifacts/11892095883 |
Signed-off-by: alperozturk96 <alper_ozturk@proton.me>
Signed-off-by: alperozturk96 <alper_ozturk@proton.me>
Signed-off-by: alperozturk96 <alper_ozturk@proton.me>
Signed-off-by: alperozturk96 <alper_ozturk@proton.me>
Signed-off-by: alperozturk96 <alper_ozturk@proton.me>
Signed-off-by: alperozturk96 <alper_ozturk@proton.me>
Signed-off-by: alperozturk96 <alper_ozturk@proton.me>
6f97f00 to
6b0ae68
Compare
|
@daniele-verducci PR is updated, could you please review again? |
|
APK file: https://github.com/nextcloud/notes-android/actions/runs/38713756532/artifacts/11961743497 |


Changes
NotesServerSyncTask.java