Fix the error handling path so that it won't hand back an output