Commit 1bd9f15d authored by Alexandre Delanoë's avatar Alexandre Delanoë

Merge remote-tracking branch 'origin/adinapoli/improve-error-at-startup' into dev

parents e3ee761d 4c97676e
......@@ -92,12 +92,13 @@ startGargantext mode port sf@(SettingsFile settingsFile) = withLoggerHoisted mod
where runDbCheck env = do
r <- runExceptT (runReaderT DB.dbCheck env) `catch`
(\(_ :: SomeException) -> pure $ Right False)
(\(err :: SomeException) -> pure $ Left err)
case r of
Right True -> pure ()
_ -> panicTrace $
"You must run 'gargantext-init " <> pack settingsFile <>
Right False -> panicTrace $
"You must run 'gargantext-cli init " <> pack settingsFile <>
"' before running gargantext-server (only the first time)."
Left err -> panicTrace $ "Unexpected exception:" <> show err
oneHour = Clock.fromNanoSecs 3600_000_000_000
portRouteInfo :: NotificationsConfig -> PortNumber -> MicroServicesProxyStatus -> IO ()
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment