Skip to content

Commit

Permalink
Added specific error handling for unauthorized in FileProviderCoordin…
Browse files Browse the repository at this point in the history
…ator
  • Loading branch information
iammajid committed Oct 14, 2024
1 parent 99a4534 commit f7821ec
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions FileProviderExtensionUI/FileProviderCoordinator.swift
Original file line number Diff line number Diff line change
Expand Up @@ -198,6 +198,15 @@ class FileProviderCoordinator: Coordinator {
guard let hostViewController = hostViewController else {
return
}

if let fileProviderError = error as? FileProviderCoordinatorError {
switch fileProviderError {
case let .unauthorized(vaultName):
showUnauthorizedError(vaultName: vaultName)
return
}
}

handleError(error, for: hostViewController)
}
}

0 comments on commit f7821ec

Please sign in to comment.