Tweaked error handling a bit based on PR feedback