OpenRailAssociation / OpenRailAssociation/github-org-manager
Non-existent user shall result in exit
Open
Beginner friendly
Nobody has claimed this yet.
- Dominant language
- Python
- Stars
- 14
- Forks
- 6
- Avg merge
- 2d 20h
- Merged PRs (30d)
- 8
Description
If the program runs into an error due to an non-existent user, it should abort and not continue. Currently, it's too easy to miss in the amount of logging messages.
[2026-09-01 15:32:25] ERROR: The user 'ue72907' configured as member of team 'NGE' does not exist on GitHub. Spelling error or did they rename themselves?
Traceback (most recent call last):
File "/opt/hostedtoolcache/Python/3.14.7/x64/lib/python3.14/site-packages/gh_org_mgr/_gh_org.py", line 131, in _resolve_gh_username
gh_user: NamedUser = self.gh.get_user(username) # type: ignore[assignment] # ty:ignore[invalid-assignment]
~~~~~~~~~~~~~~~~^^^^^^^^^^
File "/opt/hostedtoolcache/Python/3.14.7/x64/lib/python3.14/site-packages/github/MainClass.py", line 446, in get_user
user = github.NamedUser.NamedUser(requester, url=url)
File "/opt/hostedtoolcache/Python/3.14.7/x64/lib/python3.14/site-packages/github/GithubObject.py", line 633, in __init__
self.complete()
~~~~~~~~~~~~~^^
File "/opt/hostedtoolcache/Python/3.14.7/x64/lib/python3.14/site-packages/github/GithubObject.py", line 678, in complete
self._completeIfNeeded()
~~~~~~~~~~~~~~~~~~~~~~^^
File "/opt/hostedtoolcache/Python/3.14.7/x64/lib/python3.14/site-packages/github/GithubObject.py", line 687, in _completeIfNeeded
self._complete()
~~~~~~~~~~~~~~^^
File "/opt/hostedtoolcache/Python/3.14.7/x64/lib/python3.14/site-packages/github/GithubObject.py", line 692, in _complete
headers, data = self._requester.requestJsonAndCheck(
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^
"GET", self._url.value, parameters=parameters, headers=self.__completeHeaders
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
)
^
File "/opt/hostedtoolcache/Python/3.14.7/x64/lib/python3.14/site-packages/github/Requester.py", line 658, in requestJsonAndCheck
*self.__check(
~~~~~~~~~~~~^
*self.requestJson(
^^^^^^^^^^^^^^^^^^
...<7 lines>...
)
^
),
^
File "/opt/hostedtoolcache/Python/3.14.7/x64/lib/python3.14/site-packages/github/Requester.py", line 897, in __check
raise self.createException(status, responseHeaders, data)
github.GithubException.UnknownObjectException: 404 {"message": "Not Found", "documentation_url": "https://docs.github.com/rest", "status": "404"}
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start in gh_org_mgr/_gh_org.py at _resolve_gh_username, around the reported line 131, and trace how the missing-user error is returned to the organization-management flow. Reproduce the configuration with a nonexistent GitHub username and verify that processing aborts instead of continuing after the error.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- backend
- Issue type
- Bug
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Activity status
- Active
- Clarity
- Mostly clear
- Newbie friendliness
- 74/100