fix nextPage bug and error handler for Github API rate limit