Skip to content

Commit

Permalink
Better explanation of confiuration error and previous default sqlite …
Browse files Browse the repository at this point in the history
…configuration
  • Loading branch information
MartorSkull committed Sep 30, 2022
1 parent 2942ce2 commit f1dc8c9
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
2 changes: 1 addition & 1 deletion plutus-pab/src/Plutus/PAB/LocalCluster/Run.hs
Expand Up @@ -287,7 +287,7 @@ launchPAB userContractHandler
, pscSlotConfig = slotConfig
, pscKeptBlocks = securityParam
}
, dbConfig = def
, dbConfig = SqliteDB def{ dbConfigFile = T.pack (dir </> "plutus-pab.db") }
, chainQueryConfig = ChainIndexConfig def{PAB.CI.ciBaseUrl = PAB.CI.ChainIndexUrl $ BaseUrl Http "localhost" chainIndexPort ""}
, walletServerConfig = set (Wallet.Config.walletSettingsL . Wallet.Config.baseUrlL) (WalletUrl walletUrl) def
}
Expand Down
4 changes: 3 additions & 1 deletion plutus-pab/src/Plutus/PAB/Types.hs
Expand Up @@ -116,7 +116,9 @@ instance FromJSON DbConfig where
(Nothing, Just a) -> pure $ PostgresDB a
(Nothing, Nothing) -> error $ unwords
[ "No configuration available, expecting"
, "sqliteDB or postgresDB"
, "sqliteDB or postgresDB. Note if you have"
, "updated to the newer plutus you should change"
, "the dbConfig section in your yaml config file."
]
(Just _, Just _) -> error "Can't have Sqlite and Postgres databases"
parseJSON _ = fail "Expecting object value"
Expand Down

0 comments on commit f1dc8c9

Please sign in to comment.