|
|
|
@ -300,14 +300,20 @@ 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) |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
DispatchQueue.main.async { |
|
|
|
|
|
|
|
do { |
|
|
|
try failedAPICallsCollection.addOrUpdate(instance: failedAPICall) |
|
|
|
try failedAPICallsCollection.addOrUpdate(instance: failedAPICall) |
|
|
|
} catch { |
|
|
|
} catch { |
|
|
|
Logger.error(error) |
|
|
|
Logger.error(error) |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
} catch { |
|
|
|
|
|
|
|
Logger.error(error) |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|