Add error handling for octokit