diff --git a/index.php b/index.php index b5cbb60..de6eb0d 100644 --- a/index.php +++ b/index.php @@ -13,15 +13,22 @@ require_once __DIR__ . '/config.php'; require_once __DIR__ . '/functions.php'; -if (dbNew()) { - foreach (USER_KEYS as $key => $value) { - backfillUserLogs($key); - } - header('Location: /'); -} else { - foreach (USER_KEYS as $key => $value) { - syncUserLogs($key); +$bootstrapWarning = null; + +try { + if (dbNew()) { + foreach (USER_KEYS as $key => $value) { + backfillUserLogs($key); + } + header('Location: /'); + exit; + } else { + foreach (USER_KEYS as $key => $value) { + syncUserLogs($key); + } } +} catch (Exception $e) { + $bootstrapWarning = $e->getMessage(); } ?> @@ -45,6 +52,10 @@ if (dbNew()) {

Torn Vault Tracker

+ +
Warning: failed to fetch latest logs from Torn — showing cached data. ()
+ +

Transactions