Translate unexpected errors into API-specific internal errors
Merge pull request #5329 from edx/will/handle-db-errors

Translate unexpected errors into API-specific internal errors