I am using GitHub API with python. I want to validate the user existence.
url = f"https://api.github.com/users/{username}"
r = requests.get(url.format(username)).json()
I want to know that, what do GitHub API returns when the 'username' doesn't exists. I know it returns an error message of not found, but what do it returns as python? What can I do to validate it?