Fix handling of resumable upload errors in archive uploads.

This commit is contained in:
Greyson Parrelli
2025-07-30 11:46:46 -04:00
parent 1ee606de9e
commit 9204c9a1b8
2 changed files with 7 additions and 1 deletions

View File

@@ -231,6 +231,12 @@ class UploadAttachmentToArchiveJob private constructor(
is NetworkResult.StatusCodeError -> {
Log.w(TAG, "[$attachmentId] Failed to upload due to status code error. Code: ${result.code}", result.exception)
when (result.code) {
400 -> {
Log.w(TAG, "[$attachmentId] 400 likely means bad resumable state. Clearing upload spec before retrying.")
uploadSpec = null
}
}
return Result.retry(defaultBackoff())
}
}