Skip to content

Commit 3423917

Browse files
authored
Merge pull request #84 from claucambra/feature/auth-error-log
Log the specific error occurring during auth check
2 parents afd311e + e4817eb commit 3423917

1 file changed

Lines changed: 8 additions & 0 deletions

File tree

Sources/NextcloudFileProviderKit/Interface/NextcloudKit+RemoteInterface.swift

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,10 @@ import NextcloudCapabilitiesKit
1212
import NextcloudKit
1313
import OSLog
1414

15+
fileprivate let logger = Logger(
16+
subsystem: Logger.subsystem, category: "NextcloudKitRemoteInterface"
17+
)
18+
1519
extension NextcloudKit: RemoteInterface {
1620

1721
public func setDelegate(_ delegate: any NextcloudKitDelegate) {
@@ -427,6 +431,10 @@ extension NextcloudKit: RemoteInterface {
427431
let (_, _, _, error) =
428432
await enumerate(remotePath: account.davFilesUrl + "/", depth: .target, account: account)
429433

434+
if error != .success {
435+
logger.error("Error in auth check: \(error.errorDescription, privacy: .public)")
436+
}
437+
430438
if error == .success {
431439
return .success
432440
} else if error.isCouldntConnectError {

0 commit comments

Comments
 (0)