Better error handling
Closed this issue · 2 comments
vchrombie commented
I have added the support for username input.
Currently, it will throw an error if the username doesn't exist. Reproduce the steps and fix the issue by returning some warning message saying the username doesn't exist.
Steps to reproduce
- run the
script.py
in/scripts
- give a non-existent username as input
Error
Enter the GitHub username: vchrombir
Traceback (most recent call last):
File "scripts/script.py", line 49, in <module>
getpullRequests(username)
File "scripts/script.py", line 35, in getpullRequests
for pr in result['data']['repositoryOwner']['pullRequests']['nodes']:
TypeError: 'NoneType' object is not subscriptable
swainsubrat commented
Can I take the lead?
vchrombie commented
@swainsubrat, thanks for asking.
I think @adiaux has started working on it already. So, please let me know if you want to work on this project. I can surely put up some other issues. 🙂