swapped docs and Exception to type InvalidParamException

janitor-type PR