diff --git a/proxygen/lib/http/session/HTTPTransaction.cpp b/proxygen/lib/http/session/HTTPTransaction.cpp index de30ab7737..0bc28b66e0 100644 --- a/proxygen/lib/http/session/HTTPTransaction.cpp +++ b/proxygen/lib/http/session/HTTPTransaction.cpp @@ -782,7 +782,16 @@ void HTTPTransaction::onIngressTimeout() { if (windowUpdateTimeout) { HTTPException ex( HTTPException::Direction::INGRESS_AND_EGRESS, - folly::to("ingress timeout, streamID=", id_)); + folly::to( + "ingress timeout, streamID=", + id_, + ", timeout=", + idleTimeout_.has_value() + ? std::chrono::duration_cast( + idleTimeout_.value()) + .count() + : -1, + "ms")); ex.setProxygenError(kErrorWriteTimeout); // This is a protocol error ex.setCodecStatusCode(ErrorCode::PROTOCOL_ERROR); @@ -790,7 +799,16 @@ void HTTPTransaction::onIngressTimeout() { } else { HTTPException ex( HTTPException::Direction::INGRESS, - folly::to("ingress timeout, streamID=", id_)); + folly::to( + "ingress timeout, streamID=", + id_, + ", timeout=", + idleTimeout_.has_value() + ? std::chrono::duration_cast( + idleTimeout_.value()) + .count() + : -1, + "ms")); ex.setProxygenError(kErrorTimeout); onError(ex); } diff --git a/proxygen/lib/http/session/test/HTTPDownstreamSessionTest.cpp b/proxygen/lib/http/session/test/HTTPDownstreamSessionTest.cpp index 22c8a4710e..53c3069e5b 100644 --- a/proxygen/lib/http/session/test/HTTPDownstreamSessionTest.cpp +++ b/proxygen/lib/http/session/test/HTTPDownstreamSessionTest.cpp @@ -2847,7 +2847,12 @@ TEST_F(HTTP2DownstreamSessionTest, H2TimeoutWin) { handler->expectEgressPaused(); handler->expectError([&](const HTTPException& ex) { ASSERT_EQ(ex.getProxygenError(), kErrorWriteTimeout); - ASSERT_EQ(folly::to("ingress timeout, streamID=", streamID), + ASSERT_EQ(folly::to( + "ingress timeout, streamID=", + streamID, + ", timeout=", + transactionTimeouts_->getDefaultTimeout().count(), + "ms"), std::string(ex.what())); handler->terminate(); }); @@ -4150,7 +4155,12 @@ TEST_F(HTTP2DownstreamSessionTest, TestTransactionStallByFlowControl) { handler->expectError([&](const HTTPException& ex) { ASSERT_EQ(ex.getProxygenError(), kErrorWriteTimeout); - ASSERT_EQ(folly::to("ingress timeout, streamID=", streamID), + ASSERT_EQ(folly::to( + "ingress timeout, streamID=", + streamID, + ", timeout=", + transactionTimeouts_->getDefaultTimeout().count(), + "ms"), std::string(ex.what())); handler->terminate(); });