-
Notifications
You must be signed in to change notification settings - Fork 303
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
Catch and emit exceptions from downloading invalid resources #1917
Conversation
- With unmerged PR #1 - With unmerged PR google#1669 - With unmerged PR google#1927 - With unmerged PR google#1917
@omarismail94 Testing this implementation against our application. |
I will close my previous PR in favor of this. I can see the error logs and sync progress is not interrupted. |
engine/src/main/java/com/google/android/fhir/sync/FhirSynchronizer.kt
Outdated
Show resolved
Hide resolved
} | ||
} | ||
} | ||
.catch { exceptions.add(ResourceSyncException(ResourceType.Bundle, Exception(it))) } |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
discussed - if the exception is actually raised in the code where the already downloaded resources are being saved to the db, shouldn't the exception handling code be there instead of here where the resources are being downloaded?
perhaps - and only just perhaps - fhir engine's syncdownload function should return a flow... and you handle the exceptions here... but i'm not entirely sure that's the right solution here.
- With unmerged PR #1 - With unmerged PR google#1917
- With unmerged PR google#1973 - With unmerged PR #1 - With unmerged PR google#1917
- With unmerged PR #1 - With unmerged PR google#1917 - With unmerged PR google#1978 - With unmerged PR google#1964
- With unmerged PR #1 - With unmerged PR google#1917 - With unmerged PR google#1978 - With unmerged PR google#1964
Deleted my previous comment. Our issue is still not resolved yet. I had tested with my previous implementation instead. Sync job finishes with a failure when an exception is encountered, ignores the rest urls.
|
I understand the bug can be fixed by adding a null check before using the |
- With unmerged PR #1 - With unmerged PR google#1917 - With unmerged PR google#1978 - With unmerged PR google#1964 - With unmerged PR google#1963 - With unmerged PR google#1907
- With unmerged PR #1 - With unmerged PR google#1917 - With unmerged PR google#1978 - With unmerged PR google#1964 - With unmerged PR google#1907
- With unmerged PR #1 - With unmerged PR google#1917 - With unmerged PR google#1978 - With unmerged PR google#1907 - With unmerged PR google#2016 - With unmerged PR google#2032
- With unmerged PR #1 - With unmerged PR google#1917 - With unmerged PR google#1978 - With unmerged PR google#1907 - With unmerged PR google#2016 - With unmerged PR google#2032 - With unmerged PR google#1669
- With unmerged PR #1 - With unmerged PR google#1917 - With unmerged PR google#1978 - With unmerged PR google#1907 - With unmerged PR google#2032 - With unmerged PR google#1669 - With unmerged PR google#2047
@omarismail94 Do we have any update in this PR? |
IMPORTANT: All PRs must be linked to an issue (except for extremely trivial and straightforward changes).
Fixes #1654
Description
Alternative(s) considered
See PR #1669
Type
Choose one: (Bug fix | Feature | Documentation | Testing | Code health | Builds | Releases | Other)
Screenshots (if applicable)
Checklist
./gradlew spotlessApply
and./gradlew spotlessCheck
to check my code follows the style guide of this project../gradlew check
and./gradlew connectedCheck
to test my changes locally.