diff --git a/github/MainClass.py b/github/MainClass.py index 5b626ad265..e7ae7cb4e7 100644 --- a/github/MainClass.py +++ b/github/MainClass.py @@ -849,14 +849,18 @@ def get_access_token(self, installation_id, user_id=None): ) elif response.status_code == 403: raise GithubException.BadCredentialsException( - status=response.status_code, data=response.text + status=response.status_code, + data=response.text, + headers=response.headers, ) elif response.status_code == 404: raise GithubException.UnknownObjectException( - status=response.status_code, data=response.text + status=response.status_code, + data=response.text, + headers=response.headers, ) raise GithubException.GithubException( - status=response.status_code, data=response.text + status=response.status_code, data=response.text, headers=response.headers ) def get_installation(self, owner, repo):