diff --git a/config/berti.config.php b/config/berti.config.php index 451d36cb..cd33b429 100644 --- a/config/berti.config.php +++ b/config/berti.config.php @@ -120,12 +120,23 @@ return $cacheItem->get(); } - $html = $renderer( - $content, - $document, - $documentCollection, - $assetCollection - ); + try { + $html = $renderer( + $content, + $document, + $documentCollection, + $assetCollection + ); + } catch (\Exception $e) { + echo 'Temporary error, will retry in 60s: ' . $e->getMessage() . PHP_EOL; + sleep(60); + $html = $renderer( + $content, + $document, + $documentCollection, + $assetCollection + ); + } $cacheItem->set($html); $cache->save($cacheItem);