Skip to content

Commit bed8c29

Browse files
author
Melissa Mazura
committed
fix: fix the error message handling in the code
1 parent cebb9d2 commit bed8c29

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

app/src/main/java/fr/free/nrw/commons/upload/worker/UploadWorker.kt

+3-1
Original file line numberDiff line numberDiff line change
@@ -387,7 +387,9 @@ class UploadWorker(var appContext: Context, workerParams: WorkerParameters) :
387387
// genuine failure, and if we want a more extensive description then
388388
// we have those as well
389389
Timber.e("Stash Upload failed")
390-
contribution.errorMessage = "ambiguous failure: Stash Upload failed"
390+
if (uploadResult != null) {
391+
contribution.errorMessage = uploadResult.result
392+
}
391393
showFailedNotification(contribution)
392394
contribution.state = Contribution.STATE_FAILED
393395
contribution.chunkInfo = null

0 commit comments

Comments
 (0)