Don't log cert exchange connection failures

Summary: This info is still available in the diagnostic screen.

Reviewed By: passy

Differential Revision: D14164791

fbshipit-source-id: 1fc91da0b7437d530bddee6cbb5ea8c2d11f7b80
This commit is contained in:
John Knox
2019-02-21 09:58:10 -08:00
committed by Facebook Github Bot
parent 8ff625397b
commit 5fff501d26

View File

@@ -301,23 +301,25 @@ void FlipperConnectionManagerImpl::requestSignedCertFromFlipper() {
// TODO: Connect immediately, without waiting for reconnect
client_ = nullptr;
},
[this, message](folly::exception_wrapper e) {
[this, message, gettingCert](folly::exception_wrapper e) {
e.handle(
[&](rsocket::ErrorWithPayload& errorWithPayload) {
std::string errorMessage =
errorWithPayload.payload.moveDataToString();
if (errorMessage.compare("not implemented")) {
log("Desktop failed to provide certificates. Error from flipper desktop:\n" +
errorMessage);
auto error =
"Desktop failed to provide certificates. Error from flipper desktop:\n" +
errorMessage;
log(error);
gettingCert->fail(error);
client_ = nullptr;
} else {
sendLegacyCertificateRequest(message);
}
},
[e](...) {
log(("Error during certificate exchange:" + e.what())
.c_str());
[e, gettingCert](...) {
gettingCert->fail(e.what().c_str());
});
});
});