add some error handling on API queries

count the commits from the creation of the repository