Skip to content

Commit

Permalink
Don't quit early if deleting an Attachment while it's being uploaded
Browse files Browse the repository at this point in the history
  • Loading branch information
KevinBoulongne committed May 1, 2024
1 parent 576f1ec commit ab72feb
Showing 1 changed file with 4 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -288,7 +288,10 @@ class DraftsActionsWorker @AssistedInject constructor(
attachment.startUpload(localUuid)
}.onFailure { exception ->
SentryLog.d(TAG, "${exception.message}", exception)
if ((exception as Exception).isNetworkException()) throw ApiController.NetworkException()
when {
exception is UploadMissingLocalFileException -> return@onFailure
(exception as Exception).isNetworkException() -> throw ApiController.NetworkException()
}
throw exception
}
}
Expand Down

0 comments on commit ab72feb

Please sign in to comment.