Removed useless check for repo in error handling.