Better error handling. (cherry picked from commit 1511ec841a30a7a8adbec2d700502a1e685f6103)
Better error handling.
(cherry picked from commit 1511ec841a30a7a8adbec2d700502a1e685f6103)

Stanford-Online/edx-platform,caesar2164/edx-platform,Stanford-Online/edx-platform,jbassen/edx-platform,caesar2164/edx-platform,Stanford-Online/edx-platform,jbassen/edx-platform,jbassen/edx-platform,Stanford-Online/edx-platform,jbassen/edx-platform,jbassen/edx-platform,caesar2164/edx-platform,caesar2164/edx-platform