Error handling: Model-level validations, proper error responses. (backport assert_raises as context manager for Python 2.6)