Oh, I don't object to you throwing ValueError here, just that you have to catch Http404. The function get_course_by_id just has two lines, catches an ItemNotFoundError/KeyError, and raises Http404 from it. I thought it was overdue for extraction, but sure, not necessary as part of this PR.