From fab38ac1016ab1a5f6e50e4111d083943323f830 Mon Sep 17 00:00:00 2001 From: Nikita Volkov Date: Wed, 20 Jul 2022 22:37:31 +0300 Subject: [PATCH] Add handling of EmptyQuery status --- library/Hasql/Private/Decoders/Result.hs | 1 + 1 file changed, 1 insertion(+) diff --git a/library/Hasql/Private/Decoders/Result.hs b/library/Hasql/Private/Decoders/Result.hs index dc7e03f..28f54b4 100644 --- a/library/Hasql/Private/Decoders/Result.hs +++ b/library/Hasql/Private/Decoders/Result.hs @@ -63,6 +63,7 @@ checkExecStatus predicate = LibPQ.BadResponse -> serverError LibPQ.NonfatalError -> serverError LibPQ.FatalError -> serverError + LibPQ.EmptyQuery -> return () _ -> Result $ lift $ ExceptT $ pure $ Left $ UnexpectedResult $ "Unexpected result status: " <> (fromString $ show status) {-# INLINE serverError #-}