flarum/framework · error · RuntimeException
Could not fetch announcements from discuss.flarum.org:
Error message
Could not fetch announcements from discuss.flarum.org:
What it means
Network failure wrapper in AnnouncementsFetcher::fetch: the HTTP GET to discuss.flarum.org (Flarum's announcement feed) threw a GuzzleException (DNS failure, timeout, TLS error, connection refused), and the fetcher rethrows it as a RuntimeException with the underlying reason appended. The message means outbound HTTP to the announcements API failed, not that announcements are absent.
Solutions
- Check server outbound network access / firewall rules to discuss.flarum.org.
- Retry the fetch after transient network issues; consider caching the last successful announcement payload for offline fallback.
- Verify DNS resolution and TLS certificates on the host.
- Check the appended Guzzle reason for the specific transport cause.
Defensive patterns
Strategy: retry
When it happens
Trigger: Thrown at framework/core/src/Announcements/AnnouncementsFetcher.php:77 when the library encounters an invalid state.
Common situations: See trigger scenarios.
AI-assisted analysis of flarum/framework@4b939f6853 (2026-09-15).
Data as JSON: /api/errors/43be2364bc924cd2.
Report an issue: GitHub.
Appendix: source
Thrown at framework/core/src/Announcements/AnnouncementsFetcher.php:77
{
$url = self::API_BASE_URL.'?'.http_build_query([
'filter' => ['tag' => self::TAG],
'sort' => '-createdAt',
'page' => ['limit' => self::FETCH_LIMIT],
'include' => 'firstPost,user,tags',
]);
try {
$response = $this->client->get($url, [
'headers' => [
'Accept' => 'application/json',
'User-Agent' => 'Flarum/'.Application::VERSION
.' PHP/'.$this->appInfo->identifyPHPVersion()
.' Database/'.$this->appInfo->identifyDatabaseDriver().'/'.$this->appInfo->identifyDatabaseVersion(),
],
]);
} catch (GuzzleException $e) {
throw new RuntimeException('Could not fetch announcements from discuss.flarum.org: '.$e->getMessage(), 0, $e);
}
$body = json_decode((string) $response->getBody(), true);
if (! is_array($body['data'] ?? null)) {
throw new RuntimeException('Unexpected response from discuss.flarum.org.');
}
$posts = [];
$users = [];
$tagSlugs = [];
foreach ($body['included'] ?? [] as $resource) {
if (Arr::get($resource, 'type') === 'posts') {
$posts[$resource['id']] = $resource;
} elseif (Arr::get($resource, 'type') === 'users') {
$users[$resource['id']] = $resource;
} elseif (Arr::get($resource, 'type') === 'tags') {
$tagSlugs[$resource['id']] = Arr::get($resource, 'attributes.slug');View on GitHub (pinned to 4b939f6853)