Fix: improve error message

This commit is contained in:
Pieter Vander Vennet 2023-12-12 03:42:56 +01:00
parent 5585f02cad
commit 7f6c1f06e2

View file

@ -301,10 +301,9 @@ export class TagUtils {
} }
console.error("Invalid type to flatten the multiAnswer", tagsFilter) console.error("Invalid type to flatten the multiAnswer", tagsFilter)
throw ( throw `Invalid type to FlattenMultiAnswer, not one of ${
"Invalid type to FlattenMultiAnswer, not one of RegexTag, Tag or And: " + allowRegex ? "RegexTag, " : ""
tagsFilter.asHumanString(false, false, {}) }Tag or And: ${tagsFilter.asHumanString(false, false, {})}`
)
} }
return keyValues return keyValues
} }