You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Describe the bug
When an exception occurs while downloading a resource, the com.google.android.fhir.sync.download.DownloaderImpl attempts to emit a com.google.android.fhir.sync.DownloadState.Failure failure in the catch block which results to a FATAL_EXCEPTION.
Component
Core library
To Reproduce
Steps to reproduce the behavior:
Attempt downloading a resource that has an exception. (Example in our use case was an Encounter resource missing a coding.code)
Expected behavior
In case of a Resource sync failure com.google.android.fhir.sync.DownloadState.Failure should be emitted with the parameter ResourceSyncException wrapping the sync exception without violating the flow exception transparency.
@ellykits@maimoonak@f-odhiambo I created a new PR to use the flow catch feature to handle invalid resources, and added unit tests. Please see PR #1917 . From my experimentation, this should catch errors thrown after resources have been successfully downloaded, but cannot be synced into the db
Describe the bug
When an exception occurs while downloading a resource, the
com.google.android.fhir.sync.download.DownloaderImpl
attempts to emit acom.google.android.fhir.sync.DownloadState.Failure
failure in thecatch
block which results to a FATAL_EXCEPTION.Component
Core library
To Reproduce
Steps to reproduce the behavior:
Encounter
resource missing acoding.code
)Expected behavior
In case of a Resource sync failure
com.google.android.fhir.sync.DownloadState.Failure
should be emitted with the parameterResourceSyncException
wrapping the sync exception without violating the flow exception transparency.Error logs
Libraries used:
org.jetbrains.kotlinx:kotlinx-coroutines-core:1.6.2
org.jetbrains.kotlinx:kotlinx-coroutines-android:1.6.2
The text was updated successfully, but these errors were encountered: