diff --git a/hkt.hs b/hkt.hs
--- a/hkt.hs
+++ b/hkt.hs
@@ -33,6 +33,7 @@
 import Control.Applicative ((<|>), optional)
 import Control.Arrow ((&&&))
 import Control.Lens ((^.), (^..), _1, _2)
+import Control.Monad.Trans.Except (except, runExcept)
 import Control.Monad.Trans.Resource (MonadResource, MonadThrow)
 import qualified Data.Aeson as A
 import Data.Binary (get, put)
@@ -122,11 +123,11 @@
      else CL.filter matchAny)
   where
     matchAny tk =
-      either (const False) id $ fmap (keyMatchesFingerprint True tk) efp <|>
+      either (const False) id $ runExcept $ fmap (keyMatchesFingerprint True tk) efp <|>
       fmap (keyMatchesEightOctetKeyId True tk . Right) eeok <|>
       return (keyMatchesUIDSubString srch tk)
-    efp = parseFingerprint srch
-    eeok = parseEightOctetKeyId srch
+    efp = (except . parseFingerprint) srch
+    eeok = (except . parseEightOctetKeyId) srch
     ufp = RTKFilterPredicate (parseE srch)
     parseE =
       either (error . ("filter parse error: " ++)) id . parseTKExp . T.unpack -- this should be more specialized
@@ -520,11 +521,11 @@
   where
     filt = targetIsFilter o
     matchAny srch tk =
-      either (const False) id $
-      fmap (keyMatchesFingerprint True tk) (parseFingerprint srch) <|>
+      either (const False) id $ runExcept $
+      fmap (keyMatchesFingerprint True tk) ((except . parseFingerprint) srch) <|>
       fmap
         (keyMatchesEightOctetKeyId True tk . Right)
-        (parseEightOctetKeyId srch) <|>
+        ((except . parseEightOctetKeyId) srch) <|>
       return (keyMatchesUIDSubString srch tk)
     ufpt srch = RTKFilterPredicate (parseE srch)
     parseE e =
diff --git a/hopenpgp-tools.cabal b/hopenpgp-tools.cabal
--- a/hopenpgp-tools.cabal
+++ b/hopenpgp-tools.cabal
@@ -1,6 +1,6 @@
 cabal-version:       3.0
 name:                hopenpgp-tools
-version:             0.23.9
+version:             0.23.10
 synopsis:            hOpenPGP-based command-line tools
 description:         command-line tools for performing some OpenPGP-related operations
 homepage:            https://salsa.debian.org/clint/hOpenPGP-tools
@@ -26,7 +26,7 @@
                ,       optparse-applicative   >= 0.18.1.0
                ,       prettyprinter          >= 1.7.0
                ,       text
-               ,       transformers
+               ,       transformers           >= 0.4
                ,       yaml
   ghc-options:         -Wall
   other-modules:       HOpenPGP.Tools.Common
