Repository navigation
Conversation
This was referenced Oct 15, 2026
…ly-errors Signed-off-by: Milen Pivchev <milen.pivchev@gmail.com>
Contributor
There was a problem hiding this comment.
🟡 Changes recommended
Error classification and filename handling can produce misleading or unrecognizable failure messages.
2 open issues
What changed in this PR
Introduces user-friendly error messages across the iOS client while retaining technical details in logs.
Changes:
- Adds operation-specific titles and centralized message selection using NextcloudKit.
- Updates banners and saved transfer errors to use friendly messages.
- Adds unit tests, localization strings, and project integration.
| File | Description |
|---|---|
| Tests/NextcloudUnitTests/NKErrorUserFriendlyMessageTests.swift | Tests message selection and contexts. |
| Nextcloud.xcodeproj/project.xcworkspace/xcshareddata/swiftpm/Package.resolved | Updates dependency resolutions. |
| Nextcloud.xcodeproj/project.pbxproj | Registers sources and changes NextcloudKit branch. |
| iOSClient/Viewer/NCViewerRichdocuments/NCViewerRichdocuments.swift | Migrates document error banners. |
| iOSClient/Viewer/NCViewerQuickLook/NCViewerQuickLook.swift | Adds upload error context. |
| iOSClient/Viewer/NCViewerProviderContextMenu.swift | Adds transfer error context. |
| iOSClient/Viewer/NCViewerDirectEditing/NCViewerDirectEditing.swift | Migrates editing error banners. |
| iOSClient/Trash/NCTrash+Networking.swift | Migrates trash error banners. |
| iOSClient/Transfers/NCTransfersModel.swift | Displays friendly saved errors. |
| iOSClient/Terms of service/NCTermOfServiceModel.swift | Migrates terms error banners. |
| iOSClient/Supporting Files/en.lproj/Localizable.strings | Adds error wording and removes older strings. |
| iOSClient/Settings/E2EE/NCManageE2EEView.swift | Migrates encryption error banners. |
| iOSClient/Settings/E2EE/NCManageE2EEModel.swift | Passes structured encryption errors. |
| iOSClient/Settings/AutoUpload/Utility/NCAutoUploadCounter.swift | Uses friendly suspension messages. |
| iOSClient/Select/NCSelect.swift | Adds transfer error context. |
| iOSClient/Notification/NCNotification.swift | Migrates notification error banners. |
| iOSClient/Networking/NKError+UserFriendlyMessage.swift | Centralizes friendly message selection. |
| iOSClient/Networking/NCNetworking+TransferDelegate.swift | Handles missing-file errors explicitly. |
| iOSClient/Networking/NCErrorContext.swift | Defines operation contexts and titles. |
| iOSClient/Menu/NCContextMenuComment.swift | Migrates comment error banners. |
| iOSClient/Main/NCDragDrop.swift | Adds transfer contexts. |
| iOSClient/Main/Create/NCCreate.swift | Handles missing creation metadata. |
| iOSClient/Main/Collection Common/NCCollectionViewCommon+UIEditMenuInteractionDelegate.swift | Adds upload error context. |
| iOSClient/Main/Collection Common/NCCollectionViewCommon+Search.swift | Migrates search error banners. |
| iOSClient/Main/Collection Common/NCCollectionViewCommon+CollectionViewDelegate.swift | Adds download error context. |
| iOSClient/Main/Collection Common/NCCollectionViewCommon.swift | Adds transfer failure titles. |
| iOSClient/Main/Collection Common/Cell/NCListCell.swift | Displays friendly list errors. |
| iOSClient/Main/Collection Common/Cell/NCGridCell.swift | Displays friendly grid errors. |
| iOSClient/GUI/Lucid Banner/ErrorBannerView.swift | Formats friendly banners and logs technical errors. |
| iOSClient/Data/NCManageDatabase+Metadata.swift | Derives messages from saved errors. |
| iOSClient/Activity/NCActivity.swift | Migrates activity error banners. |
Review effort: Balanced
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.

Removes technical server error strings with more appropriate (and generic) user readable strings. NKLog still prints the proper server errors.
Error messages are generated based on context (ex, user is transferring a file but it fails), and if no context can be found, it relies on a generic message coming from NextcloudKit.
Ex:
507: Storage quota is reachedbecomesThere is not enough storage space left on the server.etc.What changes
NCErrorContext: Categorizes an error based on user context (moving, uploading, deleting etc). It generates errors based on said context, ex. Couldn't delete "Report.pdf".NKError.userFriendlyMessage(for:)returns an error, in the following order, whichever is not empty:localizedGenericMessageRelated: nextcloud/NextcloudKit#267
Blocked by: nextcloud/docker-ci#1011