Skip to content

Fastest and only macOS Dictation app with on-device STT and custom trained AI enhancement model. Windows, iOS testflight! Android, Linux waitlist open! A local Wispr Flow alternative. Follow https://x.com/fluidvoiceapp for more

style: format catalog error handling and fixtures

Alex Efremov369e105b314e
diff --git a/Sources/Fluid/Services/Meeting/MeetingSessionStore.swift b/Sources/Fluid/Services/Meeting/MeetingSessionStore.swift
index 924fd66d..45f980b6 100644
--- a/Sources/Fluid/Services/Meeting/MeetingSessionStore.swift
+++ b/Sources/Fluid/Services/Meeting/MeetingSessionStore.swift
@@ -156,7 +156,9 @@ actor MeetingSessionStore: MeetingSessionStoring {
let session = try reconcileAudio ? self.load(id: id) : self.readTranscript(id: id)
if let session { sessions.append(session) }
} catch {
- if firstLoadError == nil { firstLoadError = error }
+ if firstLoadError == nil {
+ firstLoadError = error
+ }
DebugLogger.shared.error(
"Failed to load meeting session \(id): \(error.localizedDescription)",
source: "MeetingSessionStore"
@@ -164,7 +166,9 @@ actor MeetingSessionStore: MeetingSessionStoring {
}
}
// Keep partial results, but do not replace history with an empty catalog after a read failure.
- if sessions.isEmpty, let firstLoadError { throw firstLoadError }
+ if sessions.isEmpty, let firstLoadError {
+ throw firstLoadError
+ }
return sessions.sorted { $0.startedAt > $1.startedAt }
}
diff --git a/Tests/FluidDictationIntegrationTests/MeetingRecoveryTests.swift b/Tests/FluidDictationIntegrationTests/MeetingRecoveryTests.swift
index 6810130e..31333294 100644
--- a/Tests/FluidDictationIntegrationTests/MeetingRecoveryTests.swift
+++ b/Tests/FluidDictationIntegrationTests/MeetingRecoveryTests.swift
@@ -1524,7 +1524,9 @@ final class MeetingRecoveryTests: XCTestCase {
let older = self.makeSession(state: .completed, startedAt: Date(timeIntervalSince1970: 100), audioTracks: [track])
let newer = self.makeSession(state: .completed, startedAt: Date(timeIntervalSince1970: 200), audioTracks: [track])
let corrupt = self.makeSession(state: .completed, audioTracks: [track])
- for session in [older, newer, corrupt] { try await store.create(session) }
+ for session in [older, newer, corrupt] {
+ try await store.create(session)
+ }
let directory = try await store.sessionDirectory(for: corrupt.id)
let manifest = directory.appendingPathComponent("session.json")
let corruptData = Data("{invalid session".utf8)