diff --git a/thrift/lib/cpp2/async/FutureRequest.h b/thrift/lib/cpp2/async/FutureRequest.h index 5aeadb4dac8..ca974763add 100644 --- a/thrift/lib/cpp2/async/FutureRequest.h +++ b/thrift/lib/cpp2/async/FutureRequest.h @@ -76,7 +76,7 @@ class FutureCallbackHelper { } static folly::Try processClientInterceptorsAndExtractResult( - PromiseResult&& result) { + PromiseResult&& result) noexcept { apache::thrift::ClientReceiveState clientReceiveState = extractClientReceiveState(result); auto* contextStack = clientReceiveState.ctx(); @@ -86,7 +86,7 @@ class FutureCallbackHelper { return folly::Try(std::move(exTry).exception()); } } - return folly::Try(extractResult(std::move(result))); + return folly::makeTryWith([&] { return extractResult(std::move(result)); }); } };