diff --git a/src/Tonatona/Servant.hs b/src/Tonatona/Servant.hs
--- a/src/Tonatona/Servant.hs
+++ b/src/Tonatona/Servant.hs
@@ -1,4 +1,5 @@
 {-# LANGUAGE AllowAmbiguousTypes #-}
+{-# LANGUAGE CPP #-}
 {-# LANGUAGE TypeApplications #-}
 
 module Tonatona.Servant
@@ -50,7 +51,11 @@
     transformation action = do
       let
         ioAction = Right <$> runRIO env action
+#if MIN_VERSION_servant(0, 16, 0)
+      eitherRes <- liftIO $ ioAction `catch` \(e :: ServerError) -> pure $ Left e
+#else
       eitherRes <- liftIO $ ioAction `catch` \(e :: ServantErr) -> pure $ Left e
+#endif
       case eitherRes of
         Right res -> pure res
         Left servantErr -> throwError servantErr
diff --git a/tonatona-servant.cabal b/tonatona-servant.cabal
--- a/tonatona-servant.cabal
+++ b/tonatona-servant.cabal
@@ -2,10 +2,10 @@
 --
 -- see: https://github.com/sol/hpack
 --
--- hash: d1dc93ead5ab1a63b021bd09a18d31f07c763a95dbe6d7f939391c712e6bffab
+-- hash: cb2a768e341fc75a377d92ed576aa4d2aef5f4f08ee1e8d590d8fecd96a0cc4e
 
 name:           tonatona-servant
-version:        0.1.0.1
+version:        0.1.0.2
 synopsis:       tonatona plugin for servant.
 description:    Tonatona plugin for @servant@. This package provides a tonatona plugin for @servant@.
 category:       Library, Tonatona, Servant, Web
