fix: Catch insufficient-storage errors (#2422)

* fix: Catch `insufficient-storage` errors

* feat: Implement `insufficient-storage` error for Android

* fix: Catch insufficient storage error also on takePhoto android
This commit is contained in:
Marc Rousavy
2024-01-24 11:48:38 +01:00
committed by GitHub
parent 7894779094
commit b1fa06514f
10 changed files with 59 additions and 14 deletions

View File

@@ -54,6 +54,8 @@ extension CameraSession {
// Something went wrong, we have an error
if error.domain == "capture/aborted" {
onError(.capture(.aborted))
} else if error.code == -11807 {
onError(.capture(.insufficientStorage))
} else {
onError(.capture(.unknown(message: "An unknown recording error occured! \(error.code) \(error.description)")))
}