File tree Expand file tree Collapse file tree 2 files changed +4
-0
lines changed
Expand file tree Collapse file tree 2 files changed +4
-0
lines changed Original file line number Diff line number Diff line change 1919### Download
2020
2121- Replace ` --tower ` with ` --platform ` . The former will remain for backwards compatability for now but will be removed in a future release.
22+ - Better error message when GITHUB_TOKEN exists but is wrong/outdated
2223
2324### Components
2425
Original file line number Diff line number Diff line change @@ -454,6 +454,7 @@ def __init__(self): # pylint: disable=super-init-not-called
454454 self .auth_mode = None
455455 self .return_ok = [200 , 201 ]
456456 self .return_retry = [403 ]
457+ self .return_unauthorised = [401 ]
457458 self .has_init = False
458459
459460 def lazy_init (self ):
@@ -546,6 +547,8 @@ def safe_get(self, url):
546547 raise e
547548 else :
548549 return r
550+ elif request .status_code in self .return_unauthorised :
551+ raise RuntimeError (f"GitHub API PR failed, probably due to an expired GITHUB_TOKEN." )
549552
550553 return request
551554
You can’t perform that action at this time.
0 commit comments