Skip to content
This repository was archived by the owner on Feb 19, 2025. It is now read-only.

Commit 033b4e2

Browse files
committed
sometimes your token is no longer valid, catch it
1 parent c2a54b2 commit 033b4e2

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

add-to-org.rb

+2
Original file line numberDiff line numberDiff line change
@@ -112,4 +112,6 @@ def add_to_org(org, username)
112112
end
113113
rescue Octokit::Forbidden
114114
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"
115+
rescue Octokit::Unauthorized
116+
abort "[401] - The credentials you've supplied are no longer valid. Please generate a new token."
115117
end

0 commit comments

Comments
 (0)