Skip to content

Commit

Permalink
sometimes your token is no longer valid, catch it
Browse files Browse the repository at this point in the history
  • Loading branch information
brntbeer committed Aug 8, 2017
1 parent c2a54b2 commit 033b4e2
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions add-to-org.rb
Original file line number Diff line number Diff line change
Expand Up @@ -112,4 +112,6 @@ def add_to_org(org, username)
end
rescue Octokit::Forbidden
abort "[403] - Unable to add member to organization. Check that the GITHUBTEACHER_TOKEN was created with administrative privilages so that you can add members to the organization"
rescue Octokit::Unauthorized
abort "[401] - The credentials you've supplied are no longer valid. Please generate a new token."
end

0 comments on commit 033b4e2

Please sign in to comment.