diff --git a/SignalServiceKit/src/Loki/API/Onion Requests/OnionRequestAPI.swift b/SignalServiceKit/src/Loki/API/Onion Requests/OnionRequestAPI.swift index 8f9e57372..2a8e8fe09 100644 --- a/SignalServiceKit/src/Loki/API/Onion Requests/OnionRequestAPI.swift +++ b/SignalServiceKit/src/Loki/API/Onion Requests/OnionRequestAPI.swift @@ -276,8 +276,9 @@ public enum OnionRequestAPI { ] let destination = Destination.server(host: host, x25519PublicKey: x25519Key) let promise = sendOnionRequest(with: payload, to: destination, associatedWith: getUserHexEncodedPublicKey(), isJSONRequired: isJSONRequired) - promise.catch2 { error in + promise.recover2 { error -> Promise in print("[Loki] [Onion Request API] Couldn't reach server: \(server) due to error: \(error).") + throw error } return promise }