This commit is contained in:
nielsandriesse 2020-07-24 11:49:07 +10:00
parent 6e6e9332bf
commit 14ca73c514
1 changed files with 2 additions and 1 deletions

View File

@ -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<JSON> in
print("[Loki] [Onion Request API] Couldn't reach server: \(server) due to error: \(error).")
throw error
}
return promise
}