|
|
|
|
@ -282,8 +282,7 @@ public class Store { |
|
|
|
|
|
|
|
|
|
guard let failedAPICallsCollection = self._failedAPICallsCollection, |
|
|
|
|
let collection = self._collections[collectionName], |
|
|
|
|
let apiCall = try? collection.apiCallById(apiCallId), |
|
|
|
|
let userId = Store.main.userId else { |
|
|
|
|
let apiCall = try? collection.apiCallById(apiCallId) else { |
|
|
|
|
return |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
@ -291,7 +290,7 @@ public class Store { |
|
|
|
|
|
|
|
|
|
do { |
|
|
|
|
let string = try apiCall.jsonString() |
|
|
|
|
let failedAPICall = FailedAPICall(user: userId, callId: apiCall.id, type: collectionName, apiCall: string, error: error) |
|
|
|
|
let failedAPICall = FailedAPICall(callId: apiCall.id, type: collectionName, apiCall: string, error: error) |
|
|
|
|
try failedAPICallsCollection.addOrUpdate(instance: failedAPICall) |
|
|
|
|
} catch { |
|
|
|
|
Logger.error(error) |
|
|
|
|
|