Catch and log DatabaseErrors in assessment.api.self.create_assessment.

https://openedx.atlassian.net/browse/TNL-812