Commit 3c93c61d by Usman Khalid

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

TNL-812
parent 76c5b89f
......@@ -170,6 +170,12 @@ def create_assessment(
msg = "Selected options do not match the rubric: " + str(ex)
logger.warning(msg, exc_info=True)
raise SelfAssessmentRequestError(msg)
except DatabaseError:
error_message = (
u"Error creating self assessment for submission {}"
).format(submission_uuid)
logger.exception(error_message)
raise SelfAssessmentInternalError(error_message)
# Return the serialized assessment
return full_assessment_dict(assessment)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment