Skip to content

fix: Unhandled apiv1 DownloadQuotaExceededException #294

Merged
sirambd merged 3 commits intomainfrom
fix-unhandled-apiv1-upload-exceptions
May 1, 2026
Merged

fix: Unhandled apiv1 DownloadQuotaExceededException #294
sirambd merged 3 commits intomainfrom
fix-unhandled-apiv1-upload-exceptions

Conversation

@sirambd
Copy link
Copy Markdown
Member

@sirambd sirambd commented May 1, 2026

No description provided.

sirambd added 2 commits May 1, 2026 13:26
Signed-off-by: Abdourahamane Boinaidi <abdourahamane.boinaidi@infomaniak.com>
Signed-off-by: Abdourahamane Boinaidi <abdourahamane.boinaidi@infomaniak.com>
Copilot AI review requested due to automatic review settings May 1, 2026 12:28
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

Handles an unhandled API v1 DownloadQuotaExceededException during post-upload transfer creation, preventing the upload flow from failing when the backend reports download quota exhaustion.

Changes:

  • Catch DownloadQuotaExceededException when adding a transfer after finishing an upload, and create a local transfer with EXPIRED_DOWNLOAD_QUOTA.
  • Thread CrashReportInterface into upload managers so the new handling can report the condition.
  • Update SwissTransferInjection wiring to match the new manager constructors.

Reviewed changes

Copilot reviewed 4 out of 4 changed files in this pull request and generated 4 comments.

File Description
STCore/src/commonMain/kotlin/com/infomaniak/multiplatform_swisstransfer/utils/TransferManagerUtils.kt Adds handling for DownloadQuotaExceededException, creates a local expired transfer, and reports via crash reporting.
STCore/src/commonMain/kotlin/com/infomaniak/multiplatform_swisstransfer/managers/UploadManager.kt Updates call to addTransferByLinkUUID to provide crashReport; adjusts exception contract (annotation) accordingly.
STCore/src/commonMain/kotlin/com/infomaniak/multiplatform_swisstransfer/managers/InMemoryUploadManager.kt Updates call to addTransferByLinkUUID to provide crashReport; constructor now requires crash reporting.
STCore/src/commonMain/kotlin/com/infomaniak/multiplatform_swisstransfer/SwissTransferInjection.kt Updates dependency injection wiring for the new UploadManager/InMemoryUploadManager constructors.

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

Signed-off-by: Abdourahamane Boinaidi <abdourahamane.boinaidi@infomaniak.com>
@sirambd sirambd enabled auto-merge May 1, 2026 12:47
@sonarqubecloud
Copy link
Copy Markdown

sonarqubecloud Bot commented May 1, 2026

@sirambd sirambd merged commit ef7822e into main May 1, 2026
6 checks passed
@sirambd sirambd deleted the fix-unhandled-apiv1-upload-exceptions branch May 1, 2026 12:48
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.

3 participants