MCPcopy Index your code
hub / github.com/PyGithub/PyGithub / _checkError

Method _checkError

github/ApplicationOAuth.py:186–192  ·  view source on GitHub ↗
(headers: dict[str, Any], data: Any)

Source from the content-addressed store, hash-verified

184
185 @staticmethod
186 def _checkError(headers: dict[str, Any], data: Any) -> tuple[dict[str, Any], Any]:
187 if isinstance(data, dict) and "error" in data:
188 if data["error"] == "bad_verification_code":
189 raise BadCredentialsException(200, data, headers)
190 raise GithubException(200, data, headers)
191
192 return headers, data
193
194 def _useAttributes(self, attributes: dict[str, Any]) -> None:
195 if "client_id" in attributes: # pragma no branch

Callers 3

get_access_tokenMethod · 0.95
refresh_access_tokenMethod · 0.95
testCheckErrorMethod · 0.80

Calls 2

GithubExceptionClass · 0.90

Tested by

no test coverage detected