throw err if there is one