From 3c3acf33a093da86a65fd497e37787b7d152cd56 Mon Sep 17 00:00:00 2001 From: Abhishek S Lal Date: Wed, 1 Apr 2026 21:12:47 +0530 Subject: [PATCH] fix: ensure tags are always an array in parseBruRequest function (#7616) Updated the parseBruRequest function to guarantee that the tags extracted from the JSON input are always returned as an array, improving data consistency and preventing potential errors when handling non-array values. --- packages/bruno-filestore/src/formats/bru/index.ts | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/packages/bruno-filestore/src/formats/bru/index.ts b/packages/bruno-filestore/src/formats/bru/index.ts index 7a899c265..db89329a0 100644 --- a/packages/bruno-filestore/src/formats/bru/index.ts +++ b/packages/bruno-filestore/src/formats/bru/index.ts @@ -32,6 +32,7 @@ export const parseBruRequest = (data: string | any, parsed: boolean = false): an } const sequence = _.get(json, 'meta.seq'); + const tags = _.get(json, 'meta.tags', []); const urlPath: Record = { 'grpc-request': 'grpc.url', 'ws-request': 'ws.url', @@ -42,7 +43,7 @@ export const parseBruRequest = (data: string | any, parsed: boolean = false): an name: _.get(json, 'meta.name'), seq: !_.isNaN(sequence) ? Number(sequence) : 1, settings: _.get(json, 'settings', {}), - tags: _.get(json, 'meta.tags', []), + tags: Array.isArray(tags) ? tags : [], request: { // Preserving special characters in custom methods. Using _.upperCase strips special characters. method: