sync
Laurent 1 year ago
parent e134581896
commit ecc4791342
  1. 10
      LeStorage/StoreCenter.swift

@ -300,7 +300,14 @@ public class StoreCenter {
let authValue = request.allHTTPHeaderFields?["Authorization"] let authValue = request.allHTTPHeaderFields?["Authorization"]
let string = try apiCall.jsonString() let string = try apiCall.jsonString()
let failedAPICall = FailedAPICall(callId: apiCall.id, type: collectionName, apiCall: string, error: error, authentication: authValue) let failedAPICall = FailedAPICall(callId: apiCall.id, type: collectionName, apiCall: string, error: error, authentication: authValue)
try failedAPICallsCollection.addOrUpdate(instance: failedAPICall)
DispatchQueue.main.async {
do {
try failedAPICallsCollection.addOrUpdate(instance: failedAPICall)
} catch {
Logger.error(error)
}
}
} catch { } catch {
Logger.error(error) Logger.error(error)
} }
@ -308,7 +315,6 @@ public class StoreCenter {
} }
} }
} }
/// Logs a failed Api call with its request and error message /// Logs a failed Api call with its request and error message

Loading…
Cancel
Save