fix: Unhandled apiv1 DownloadQuotaExceededException #294
Merged
Conversation
Signed-off-by: Abdourahamane Boinaidi <abdourahamane.boinaidi@infomaniak.com>
Signed-off-by: Abdourahamane Boinaidi <abdourahamane.boinaidi@infomaniak.com>
Contributor
There was a problem hiding this comment.
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
DownloadQuotaExceededExceptionwhen adding a transfer after finishing an upload, and create a local transfer withEXPIRED_DOWNLOAD_QUOTA. - Thread
CrashReportInterfaceinto upload managers so the new handling can report the condition. - Update
SwissTransferInjectionwiring 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.
LunarX
approved these changes
May 1, 2026
Signed-off-by: Abdourahamane Boinaidi <abdourahamane.boinaidi@infomaniak.com>
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.



No description provided.