fix error handling in pull request