Adding error-checking for getting repositories.