Currently the api only allows to test that a function throws an error if a particular type.
Due to limitations in AppsScripts, the test can fail even though an error is actually thrown, since the isinstance test fails. An error objected created in the utgs library won't be an instance of an error object in the main project.
Also, error messages should also be exposed via the api, so a test can be do based on the message.