Raise an exception instead of returning an error value.
Raise an exception instead of returning an error value.

This is a bit more pythonic. The linter was complaining that the returns
weren't consistent and this fixes it.

ddddavidmartin/branch-notes,ddddavidmartin/branch-notes