11import OSLog
22
3- internal class PowerSyncBackendConnectorAdapter : KotlinPowerSyncBackendConnector {
3+ class PowerSyncBackendConnectorAdapter : KotlinPowerSyncBackendConnector {
44 let swiftBackendConnector : PowerSyncBackendConnector
55 let db : any PowerSyncDatabaseProtocol
66 let logTag = " PowerSyncBackendConnector "
7-
7+
88 init (
99 swiftBackendConnector: PowerSyncBackendConnector ,
1010 db: any PowerSyncDatabaseProtocol
1111 ) {
1212 self . swiftBackendConnector = swiftBackendConnector
1313 self . db = db
1414 }
15-
15+
1616 override func __fetchCredentials( ) async throws -> KotlinPowerSyncCredentials ? {
1717 do {
1818 let result = try await swiftBackendConnector. fetchCredentials ( )
1919 return result? . kotlinCredentials
2020 } catch {
2121 db. logger. error ( " Error while fetching credentials " , tag: logTag)
22- /// We can't use throwKotlinPowerSyncError here since the Kotlin connector
22+ /// We can't use throwKotlinPowerSyncError here since the Kotlin connector
2323 /// runs this in a Job - this seems to break the SKIEE error propagation.
2424 /// returning nil here should still cause a retry
2525 return nil
@@ -35,7 +35,7 @@ internal class PowerSyncBackendConnectorAdapter: KotlinPowerSyncBackendConnector
3535 // Relay the error to the Kotlin SDK
3636 try throwKotlinPowerSyncError (
3737 message: " Connector errored while uploading data: \( error. localizedDescription) " ,
38- cause: error. localizedDescription,
38+ cause: error. localizedDescription
3939 )
4040 }
4141 }
0 commit comments