fix(reddit): cache tweak for 403 forbidden (#3830)

This commit is contained in:
Dag 2023-12-13 21:56:14 +01:00 committed by GitHub
parent f01729c86f
commit d157816e07
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
4 changed files with 14 additions and 2 deletions

View file

@ -85,6 +85,11 @@ class RedditBridge extends BridgeAbstract
if ($e->getCode() === 429) {
$this->cache->set($cacheKey, true, 60 * 16);
}
if ($e->getCode() === 403) {
// 403 Forbidden
// This can possibly mean that reddit has permanently blocked this server's ip address
$this->cache->set($cacheKey, true, 60 * 61);
}
throw $e;
}
}