phacility/phabricator · error · PhutilProxyException
Expected valid JSON response from GitHub account data…
Error message
Expected valid JSON response from GitHub account data request.
What it means
Raised in the GitHub OAuth adapter when the authenticated GET to api.github.com/user returns a non-JSON body (parse failure wrapped in PhutilProxyException). Typically caused by GitHub API rate limiting, credential revocation, or an HTML error page.
Solutions
- Retry the login; rate-limit responses are often temporary
- Verify the GitHub OAuth application token is still valid
- Check whether GitHub is reporting an incident or the token was revoked
Defensive patterns
Strategy: try-catch
When it happens
Trigger: Thrown at src/applications/auth/adapter/PhutilGitHubAuthAdapter.php:70 when the library encounters an invalid state.
Common situations: See trigger scenarios.
AI-assisted analysis of phacility/phabricator@5720a38cfe (2026-08-21).
Data as JSON: /api/errors/ab6187ab1844e27b.
Report an issue: GitHub.
Appendix: source
Thrown at src/applications/auth/adapter/PhutilGitHubAuthAdapter.php:70
protected function loadOAuthAccountData() {
$uri = new PhutilURI('https://api.github.com/user');
$future = new HTTPSFuture($uri);
// NOTE: GitHub requires a User-Agent string.
$future->addHeader('User-Agent', __CLASS__);
// See T13485. Circa early 2020, GitHub has deprecated use of the
// "access_token" URI parameter.
$token_header = sprintf('token %s', $this->getAccessToken());
$future->addHeader('Authorization', $token_header);
list($body) = $future->resolvex();
try {
return phutil_json_decode($body);
} catch (PhutilJSONParserException $ex) {
throw new PhutilProxyException(
pht('Expected valid JSON response from GitHub account data request.'),
$ex);
}
}
}
View on GitHub (pinned to 5720a38cfe)