And thanks for the note--I was pretty happy with how this code turned out as well!  This follow-up pull request is in a similar vein, and I think rounds out the effort to expose errors to users in meaningful ways:
https://github.com/learningequality/ka-lite/pull/420

If you have a moment to triage, it would be great!  I think it's unnecessary to include in v0.10, but would definitely round out what's going on here (currently, errors in delete_videos, for example, would be exposed as HTML errors, because they're uncaught exceptions that generate HTML)