File tree Expand file tree Collapse file tree 1 file changed +6
-0
lines changed
Demo/PowerSyncExample/PowerSync Expand file tree Collapse file tree 1 file changed +6
-0
lines changed Original file line number Diff line number Diff line change @@ -112,6 +112,12 @@ class SupabaseConnector: PowerSyncBackendConnector {
112
112
} catch {
113
113
if let errorCode = PostgresFatalCodes . extractErrorCode ( from: error) ,
114
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.
115
121
print ( " Data upload error: \( error) " )
116
122
print ( " Discarding entry: \( lastEntry!) " )
117
123
_ = try await transaction. complete. invoke ( p1: nil )
You can’t perform that action at this time.
0 commit comments