Send the right exception to TimelineTab

This commit is contained in:
Shinokuni 2024-08-19 17:38:04 +02:00
parent 6d55c3200a
commit adb2b0c192
1 changed files with 2 additions and 2 deletions

View File

@ -94,13 +94,13 @@ class SyncWorker(
workResult
} catch (e: Exception) {
Log.e(TAG, "${e::class.simpleName}: ${e.message} ${e.printStackTrace()}")
Log.e(TAG, "${e.printStackTrace()}")
notificationManager.cancel(SYNC_NOTIFICATION_ID)
if (isManual) {
Result.failure(
workDataOf(SYNC_FAILURE_KEY to true)
.putSerializable(SYNC_FAILURE_EXCEPTION_KEY, e)
.putSerializable(SYNC_FAILURE_EXCEPTION_KEY, Exception(e.cause))
)
} else {
Result.failure()