core: handle all DB errors (#763)

This commit is contained in:
Evgeny Poberezkin
2022-07-01 10:37:26 +01:00
committed by GitHub
parent 815981487b
commit 96866c7a5d

View File

@@ -2247,7 +2247,7 @@ withStore action = do
liftEitherError ChatErrorStore $
withTransaction st (runExceptT . action) `E.catch` handleInternal
where
handleInternal :: DB.SQLError -> IO (Either StoreError a)
handleInternal :: E.SomeException -> IO (Either StoreError a)
handleInternal = pure . Left . SEInternalError . show
chatCommandP :: Parser ChatCommand