From dd18cdb23e73abb098004ef2fb3d2366084e6057 Mon Sep 17 00:00:00 2001 From: zodern Date: Thu, 11 Jul 2024 17:18:35 -0500 Subject: [PATCH] Check for valid error --- lib/tracer/tracer_store.js | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/lib/tracer/tracer_store.js b/lib/tracer/tracer_store.js index f30619e9..25bf87d5 100644 --- a/lib/tracer/tracer_store.js +++ b/lib/tracer/tracer_store.js @@ -60,6 +60,11 @@ TracerStore.prototype._handleErrors = function (trace) { if (lastEvent && lastEvent[2]) { let error = lastEvent[2].error; + if (!error) { + logger('trace does not have valid error', JSON.stringify(trace.events)); + return; + } + // grouping errors occured (reset after processTraces) let errorKey = [trace.type, trace.name, error.message].join('::'); if (!this.errorMap[errorKey]) {