Why exc.args[0] as opposed to course_id? Also, can you create a new method in courseware/courses.py that just does the retrieval part that `get_course_by_id`, use that new method here, and have `get_course_by_id` call that? This is internal stuff -- catching a ItemNotFoundError makes a lot more sense to me than catching Http404.