From eab806620c84878047eabb455a342da2f9a5a944 Mon Sep 17 00:00:00 2001 From: Ward Bekker Date: Wed, 25 May 2022 09:13:43 +0200 Subject: [PATCH] Prevent exception when panel has multiple queries (#49368) This fixes the issues that when a panel has multiple queries this throws an exception if source is not part of the current frame Co-authored-by: Ryan McKinley --- .../app/features/transformers/extractFields/extractFields.ts | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/public/app/features/transformers/extractFields/extractFields.ts b/public/app/features/transformers/extractFields/extractFields.ts index 81628b595ed..ede77024b40 100644 --- a/public/app/features/transformers/extractFields/extractFields.ts +++ b/public/app/features/transformers/extractFields/extractFields.ts @@ -41,7 +41,8 @@ function addExtractedFields(frame: DataFrame, options: ExtractFieldsOptions): Da } const source = findField(frame, options.source); if (!source) { - throw new Error('json field not found'); + // this case can happen when there are multiple queries + return frame; } const ext = fieldExtractors.getIfExists(options.format ?? FieldExtractorID.Auto);