phacility/phabricator · error · ConduitException
ERR-RATE-LIMIT
ERR-RATE-LIMIT
Error message
ERR-RATE-LIMIT
What it means
conduit.getcertificate counts certificate-failure events logged from the current IP over the last 5 minutes (PhabricatorUserLog::loadRecentEventsFromThisIP). More than 5 failures trips 'ERR-RATE-LIMIT', and the rejected attempt is itself logged as another failure, extending the pressure on the IP.
Source
Thrown at src/applications/conduit/method/ConduitGetCertificateConduitAPIMethod.php:49
}
protected function defineErrorTypes() {
return array(
'ERR-BAD-TOKEN' => pht('Token does not exist or has expired.'),
'ERR-RATE-LIMIT' => pht(
'You have made too many invalid token requests recently. Wait before '.
'making more.'),
);
}
protected function execute(ConduitAPIRequest $request) {
$failed_attempts = PhabricatorUserLog::loadRecentEventsFromThisIP(
PhabricatorConduitCertificateFailureUserLogType::LOGTYPE,
60 * 5);
if (count($failed_attempts) > 5) {
$this->logFailure($request);
throw new ConduitException('ERR-RATE-LIMIT');
}
$token = $request->getValue('token');
$info = id(new PhabricatorConduitCertificateToken())->loadOneWhere(
'token = %s',
trim($token));
if (!$info || $info->getDateCreated() < time() - (60 * 15)) {
$this->logFailure($request, $info);
throw new ConduitException('ERR-BAD-TOKEN');
} else {
$log = PhabricatorUserLog::initializeNewLog(
$request->getUser(),
$info->getUserPHID(),
PhabricatorConduitCertificateUserLogType::LOGTYPE)
->save();
}
View on GitHub (pinned to 5720a38cfe)
Solutions
- Stop all attempts from that IP for at least 5 minutes so the failure events age out of the window.
- Find and fix the underlying bad-token/credential source (see ERR-BAD-TOKEN) before resuming, otherwise the limit immediately re-trips.
- Add exponential backoff to retry logic and identify the offending client via the Phabricator activity/people log.
Defensive patterns
Strategy: retry
Try / catch
try {
$result = $call->execute();
} catch (ConduitException $ex) {
if ($ex->getMessage() === 'ERR-RATE-LIMIT') {
// Sleep > 5 minutes, fix the underlying bad token, then retry once.
}
} Prevention
- Cap retries on certificate fetches (e.g. 3 attempts with exponential backoff), never tight loops.
- Remember the window is per IP: coordinate CI runners sharing NAT egress.
- Investigate the first ERR-BAD-TOKEN instead of retrying through the rate limit.
When it happens
Trigger: A retry loop hammering conduit.getcertificate with bad tokens; several developers or CI runners behind one NAT IP accumulating failures; automated scripts retrying immediately on every auth error.
Common situations: A misconfigured integration stuck in a hot retry loop blocking the whole office NAT; shared build-farm egress addresses where one broken job locks out all others.
Related errors
- ERR-INVALID-USER
- ERR-INVALID-CERTIFICATE
- ERR-NO-CERTIFICATE
- ERR-BAD-TOKEN
- Certificate token points to an invalid user!
AI-assisted analysis of phacility/phabricator@5720a38cfe (2026-08-21).
Data as JSON: /api/errors/2337e40040852f32.
Report an issue: GitHub.