I could not use InvalidParameters, because I can't pass a parameter to it, just the error message.
I'll have to refactor InvalidParameters, if I'd like to use it, which is in lims-core :(