From ed9e162af02d893c5485b748e12a7ccd6bd38d9e Mon Sep 17 00:00:00 2001 From: AmitUp9 <96980485+AmitUp9@users.noreply.github.com> Date: Thu, 28 Apr 2022 15:18:08 +0300 Subject: [PATCH] validation that grpc error render only when needed (#1051) --- .../components/TrafficViewer/EntryDetailed/EntrySections.tsx | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/ui-common/src/components/TrafficViewer/EntryDetailed/EntrySections.tsx b/ui-common/src/components/TrafficViewer/EntryDetailed/EntrySections.tsx index 02321c5e1..d43bda4d1 100644 --- a/ui-common/src/components/TrafficViewer/EntryDetailed/EntrySections.tsx +++ b/ui-common/src/components/TrafficViewer/EntryDetailed/EntrySections.tsx @@ -158,9 +158,10 @@ export const EntryBodySection: React.FC = ({ return jsonBeautify(protobufDecoded, null, 2, 80); } } catch (error) { - if(isDecodeGrpc) + if (String(error).includes("More than one message in")){ + if(isDecodeGrpc) setIsDecodeGrpc(false); - if (!String(error).includes("More than one message in")){ + } else { console.error(error); } }