diff --git a/LeStorage/ApiCallCollection.swift b/LeStorage/ApiCallCollection.swift index 8e8fe59..6d7adf8 100644 --- a/LeStorage/ApiCallCollection.swift +++ b/LeStorage/ApiCallCollection.swift @@ -253,7 +253,7 @@ actor ApiCallCollection: SomeCallCollection { return try await self._synchronize(instance, method: HTTPMethod.post) } catch { self.rescheduleApiCallsIfNecessary() - StoreCenter.main.log(message: "POST failed for \(instance)") + StoreCenter.main.log(message: "POST failed for \(instance): \(error.localizedDescription)") Logger.error(error) } return nil @@ -266,7 +266,7 @@ actor ApiCallCollection: SomeCallCollection { return try await self._synchronize(instance, method: HTTPMethod.put) } catch { self.rescheduleApiCallsIfNecessary() - StoreCenter.main.log(message: "PUT failed for \(instance)") + StoreCenter.main.log(message: "PUT failed for \(instance): \(error.localizedDescription)") Logger.error(error) } return nil @@ -278,7 +278,7 @@ actor ApiCallCollection: SomeCallCollection { let _: Empty? = try await self._synchronize(instance, method: HTTPMethod.delete) } catch { self.rescheduleApiCallsIfNecessary() - StoreCenter.main.log(message: "DELETE failed for \(instance)") + StoreCenter.main.log(message: "DELETE failed for \(instance): \(error.localizedDescription)") Logger.error(error) } return @@ -294,12 +294,6 @@ actor ApiCallCollection: SomeCallCollection { } } - /// Executes an API call - /// For POST requests, potentially copies additional data coming from the server during the insert -// fileprivate func _executeApiCall(_ apiCall: ApiCall) async throws -> T { -// return try await StoreCenter.main.execute(apiCall: apiCall) -// } - /// Executes an API call /// For POST requests, potentially copies additional data coming from the server during the insert fileprivate func _executeApiCall(_ apiCall: ApiCall) async throws -> V {