We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent dc1a76f commit 2f5a2e0Copy full SHA for 2f5a2e0
Demo/PowerSyncExample/PowerSync/SupabaseConnector.swift
@@ -112,6 +112,12 @@ class SupabaseConnector: PowerSyncBackendConnector {
112
} catch {
113
if let errorCode = PostgresFatalCodes.extractErrorCode(from: error),
114
PostgresFatalCodes.isFatalError(errorCode) {
115
+ /// Instead of blocking the queue with these errors,
116
+ /// discard the (rest of the) transaction.
117
+ ///
118
+ /// Note that these errors typically indicate a bug in the application.
119
+ /// If protecting against data loss is important, save the failing records
120
+ /// elsewhere instead of discarding, and/or notify the user.
121
print("Data upload error: \(error)")
122
print("Discarding entry: \(lastEntry!)")
123
_ = try await transaction.complete.invoke(p1: nil)
0 commit comments