Skip to content

chore: Add missing DownloadQuotaExceededException to finishUploadSession @Throws#292

Merged
valentinperignon merged 2 commits intomainfrom
copilot/add-throws-annotations-to-uploadmanager
May 1, 2026
Merged

chore: Add missing DownloadQuotaExceededException to finishUploadSession @Throws#292
valentinperignon merged 2 commits intomainfrom
copilot/add-throws-annotations-to-uploadmanager

Conversation

Copy link
Copy Markdown
Contributor

Copilot AI commented May 1, 2026

finishUploadSession() was missing DownloadQuotaExceededException from its @Throws declaration, causing incomplete Swift interop exception bridging.

Root cause

finishUploadSession() calls the TransferManager.addTransferByLinkUUID() extension in TransferManagerUtils.kt, which wraps the inner call in runCatching and selectively handles only FetchTransferException subclasses — everything else is re-thrown. DownloadQuotaExceededException extends Exception directly (not FetchTransferException), so it escapes and propagates to the caller.

Changes

  • UploadManager.kt
    • Added DownloadQuotaExceededException::class to @Throws on finishUploadSession()
    • Added corresponding @throws KDoc tag
    • Added required import
@Throws(
    ...
    DownloadQuotaExceededException::class,  // added — not a FetchTransferException, propagates through TransferManagerUtils
)
suspend fun finishUploadSession(uuid: String): String

@valentinperignon valentinperignon force-pushed the copilot/add-throws-annotations-to-uploadmanager branch from 6838830 to 3e4d644 Compare May 1, 2026 04:42
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Adds DownloadQuotaExceededException to UploadManager.finishUploadSession()’s @Throws and KDoc so Kotlin/Native (Swift) exception bridging is complete when this exception propagates through TransferManagerUtils.addTransferByLinkUUID.

Changes:

  • Added DownloadQuotaExceededException::class to @Throws for finishUploadSession().
  • Added corresponding @throws DownloadQuotaExceededException KDoc entry.
  • Added the required import in UploadManager.kt.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
@sonarqubecloud
Copy link
Copy Markdown

sonarqubecloud Bot commented May 1, 2026

@valentinperignon valentinperignon changed the title fix: add missing DownloadQuotaExceededException to finishUploadSession @Throws fix: Add missing DownloadQuotaExceededException to finishUploadSession @Throws May 1, 2026
@valentinperignon valentinperignon changed the title fix: Add missing DownloadQuotaExceededException to finishUploadSession @Throws chore: Add missing DownloadQuotaExceededException to finishUploadSession @Throws May 1, 2026
@valentinperignon valentinperignon requested a review from LunarX May 1, 2026 04:46
@valentinperignon valentinperignon merged commit c67a2d3 into main May 1, 2026
9 of 10 checks passed
@valentinperignon valentinperignon deleted the copilot/add-throws-annotations-to-uploadmanager branch May 1, 2026 06:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants