Description
This is to address Eli's comments on the parent task:
1. The error messages should generate the lists of valid states and types from their definitions rather than hard-coding them into the error messages.
2. Aren't these types and states defined somewhere already? Seems like they're a public API and therefore shouldn't have to duplicate the definition of them in taskTypes and taskStates.