From 85ea965cc592296d9051e916dc7797b49126a9f5 Mon Sep 17 00:00:00 2001 From: Harald Alvestrand Date: Fri, 6 Oct 2023 11:32:41 +0000 Subject: [PATCH] Let ValidateSessionDescription decide error on failure MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Return the error code from ValidateSessionDescription rather than returning INTERNAL_ERROR for every failure case. Bug: chromium:1490510 Change-Id: I3b745174ce986f9d7ebfa051c116b1c9d29e31c2 Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/322622 Commit-Queue: Harald Alvestrand Reviewed-by: Henrik Boström Reviewed-by: Philipp Hancke Reviewed-by: Artem Titov Cr-Commit-Position: refs/heads/main@{#40885} --- pc/sdp_offer_answer.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pc/sdp_offer_answer.cc b/pc/sdp_offer_answer.cc index 1ed5c80c29..4a77b7546c 100644 --- a/pc/sdp_offer_answer.cc +++ b/pc/sdp_offer_answer.cc @@ -2364,7 +2364,7 @@ void SdpOfferAnswerHandler::DoSetLocalDescription( cricket::CS_LOCAL, desc->GetType(), error); RTC_LOG(LS_ERROR) << error_message; observer->OnSetLocalDescriptionComplete( - RTCError(RTCErrorType::INTERNAL_ERROR, std::move(error_message))); + RTCError(error.type(), std::move(error_message))); return; }