mirror of
https://github.com/status-im/PyGithub.git
synced 2026-08-31 19:01:15 +00:00
Export headers in GithubException (#1887)
Since the headers that led to an exception are also useful, firstly pass them into the constructor, and then export them in a property. Test one specific use case to make sure of coverage. Fixes #1814
This commit is contained in:
@@ -300,7 +300,7 @@ class CompletableGithubObject(GithubObject):
|
||||
def __complete(self):
|
||||
if self._url.value is None:
|
||||
raise GithubException.IncompletableObject(
|
||||
400, "Returned object contains no URL"
|
||||
400, "Returned object contains no URL", None
|
||||
)
|
||||
headers, data = self._requester.requestJsonAndCheck("GET", self._url.value)
|
||||
self._storeAndUseAttributes(headers, data)
|
||||
|
||||
Reference in New Issue
Block a user