fix(ios): iptal edilen isteklerde hata gösterimini düzelt

- API uç noktasını yeni IP adresine güncelle
- Docker yapılandırmasında node_modules için adlandırılmış volume ekle
- Arama işlemlerinde iptal durumlarını yoksay ve hata mesajı gösterme
- NetworkErrorView'da wifi ikonunu kaldır
This commit is contained in:
2026-02-11 22:22:20 +03:00
parent 362b9b7d1b
commit 98e2a1d3f1
9 changed files with 39 additions and 8 deletions

View File

@@ -56,6 +56,7 @@ final class AddBooksViewModel: ObservableObject {
results = try await booksService.searchByTitle(value, locales: "tr,en")
errorMessage = nil
} catch {
guard !isIgnorable(error) else { return }
errorMessage = error.localizedDescription
}
}
@@ -69,6 +70,7 @@ final class AddBooksViewModel: ObservableObject {
results = try await booksService.searchByISBN(isbn, locales: "tr,en")
errorMessage = nil
} catch {
guard !isIgnorable(error) else { return }
errorMessage = error.localizedDescription
}
}
@@ -82,7 +84,22 @@ final class AddBooksViewModel: ObservableObject {
results = try await booksService.filter(title: filterTitle, year: filterYear, locales: "tr,en")
errorMessage = nil
} catch {
guard !isIgnorable(error) else { return }
errorMessage = error.localizedDescription
}
}
private func isIgnorable(_ error: Error) -> Bool {
if error is CancellationError {
return true
}
let nsError = error as NSError
if nsError.domain == NSURLErrorDomain, nsError.code == NSURLErrorCancelled {
return true
}
let message = error.localizedDescription.lowercased()
return message.contains("cancelled") || message.contains("vazgeç")
}
}