Skip to content

Commit

Permalink
Improve error message when an empty var is set
Browse files Browse the repository at this point in the history
Fixes #962
  • Loading branch information
mikaoelitiana committed Nov 14, 2023
1 parent f617504 commit 500e385
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion packages/bruno-js/src/bru.js
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down

0 comments on commit 500e385

Please sign in to comment.