Make sure network error is shown in UI instead of generic error

Signed-off-by: Claudio Cambra <claudio.cambra@nextcloud.com>
This commit is contained in:
Claudio Cambra 2024-04-18 02:07:48 +08:00
parent ac1b11708f
commit 19cf69ccd3
No known key found for this signature in database
GPG key ID: C839200C384636B0

View file

@ -99,6 +99,7 @@ class ShareTableViewDataSource: NSObject, NSTableViewDataSource, NSTableViewDele
account = convertedAccount account = convertedAccount
await sharesTableView?.deselectAll(self) await sharesTableView?.deselectAll(self)
capabilities = await fetchCapabilities() capabilities = await fetchCapabilities()
guard capabilities != nil else { return }
guard capabilities?.filesSharing?.apiEnabled == true else { guard capabilities?.filesSharing?.apiEnabled == true else {
presentError("Server does not support shares.") presentError("Server does not support shares.")
return return