Skip to content

Commit

Permalink
fix: improving error message in getLabels
Browse files Browse the repository at this point in the history
  • Loading branch information
leftieFriele committed Jun 21, 2024
1 parent 564e467 commit efa3267
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion lib/util.js
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,9 @@ exports.getLabels = function (labelNames, args) {
}

if (labelNames.length !== args.length) {
throw new Error('Invalid number of arguments');
throw new Error(
`Invalid number of arguments. Got ${args.join()}. Expected ${labelNames.join()}.`,
);
}

const acc = {};
Expand Down

0 comments on commit efa3267

Please sign in to comment.