diff --git a/src/infrastructure/cluster/PhabricatorDatabaseRef.php b/src/infrastructure/cluster/PhabricatorDatabaseRef.php --- a/src/infrastructure/cluster/PhabricatorDatabaseRef.php +++ b/src/infrastructure/cluster/PhabricatorDatabaseRef.php @@ -405,6 +405,12 @@ try { $connection->openConnection(); $reachable = true; + } catch (AphrontSchemaQueryException $ex) { + // We get one of these if the database we're trying to select does not + // exist. In this case, just re-throw the exception. This is expected + // during first-time setup, when databases like "config" will not exist + // yet. + throw $ex; } catch (Exception $ex) { $reachable = false; } diff --git a/src/infrastructure/env/PhabricatorEnv.php b/src/infrastructure/env/PhabricatorEnv.php --- a/src/infrastructure/env/PhabricatorEnv.php +++ b/src/infrastructure/env/PhabricatorEnv.php @@ -231,7 +231,7 @@ $stack->pushSource( id(new PhabricatorConfigDatabaseSource('default')) ->setName(pht('Database'))); - } catch (AphrontQueryException $exception) { + } catch (AphrontSchemaQueryException $exception) { // If the database is not available, just skip this configuration // source. This happens during `bin/storage upgrade`, `bin/conf` before // schema setup, etc.