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 {
112112 } catch {
113113 if let errorCode = PostgresFatalCodes . extractErrorCode ( from: error) ,
114114 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.
115121 print ( " Data upload error: \( error) " )
116122 print ( " Discarding entry: \( lastEntry!) " )
117123 _ = try await transaction. complete. invoke ( p1: nil )
You can’t perform that action at this time.
0 commit comments