From 500e3853a598fdcda47823428d08e68f5324551d Mon Sep 17 00:00:00 2001 From: Mika Andrianarijaona Date: Tue, 14 Nov 2023 16:33:27 +0100 Subject: [PATCH] Improve error message when an empty var is set Fixes #962 --- packages/bruno-js/src/bru.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/bruno-js/src/bru.js b/packages/bruno-js/src/bru.js index 078aacc7..884b05a5 100644 --- a/packages/bruno-js/src/bru.js +++ b/packages/bruno-js/src/bru.js @@ -58,7 +58,7 @@ class Bru { setVar(key, value) { if (!key) { - throw new Error('Key is required'); + throw new Error('A variable with an empty name has been created but name is required.'); } if (envVariableNameRegex.test(key) === false) {