Reruns/cms server side LMS-11016

This PR is an updated version of this old one: https://github.com/edx/edx-platform/pull/4573
Why aren't we catching `InvalidLocationError` so that we can return a sensible error code?