mirror of
https://github.com/nikita-volkov/hasql.git
synced 2024-11-23 02:35:33 +03:00
Add handling of EmptyQuery status
This commit is contained in:
parent
cf6458fe76
commit
fab38ac101
@ -63,6 +63,7 @@ checkExecStatus predicate =
|
|||||||
LibPQ.BadResponse -> serverError
|
LibPQ.BadResponse -> serverError
|
||||||
LibPQ.NonfatalError -> serverError
|
LibPQ.NonfatalError -> serverError
|
||||||
LibPQ.FatalError -> serverError
|
LibPQ.FatalError -> serverError
|
||||||
|
LibPQ.EmptyQuery -> return ()
|
||||||
_ -> Result $ lift $ ExceptT $ pure $ Left $ UnexpectedResult $ "Unexpected result status: " <> (fromString $ show status)
|
_ -> Result $ lift $ ExceptT $ pure $ Left $ UnexpectedResult $ "Unexpected result status: " <> (fromString $ show status)
|
||||||
|
|
||||||
{-# INLINE serverError #-}
|
{-# INLINE serverError #-}
|
||||||
|
Loading…
Reference in New Issue
Block a user