Skip to content

Commit

Permalink
Better error message
Browse files Browse the repository at this point in the history
Signed-off-by: Aurélien Bompard <aurelien@bompard.org>
  • Loading branch information
abompard committed Jan 17, 2022
1 parent 127f13f commit a851680
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion datagrepper/util.py
Original file line number Diff line number Diff line change
Expand Up @@ -185,7 +185,11 @@ def meta_argument(msg, meta):
"date",
}
if len(set(meta).intersection(meta_expected)) != len(set(meta)):
raise ValueError("meta must be in %s" % ",".join(list(meta_expected)))
raise ValueError(
"meta must be in {}. Got {}".format(
",".join(list(meta_expected)), list(meta)
)
)

fm_msg = get_fm_message(msg)

Expand Down

0 comments on commit a851680

Please sign in to comment.