@@ -227,7 +227,7 @@ captured _ = fromText
227227-- >
228228-- > server :: Server MyApi
229229-- > server = getBook
230−-- > where getBook :: Text -> EitherT (Int, String) IO Book
230+-- > where getBook :: Text -> EitherT ServantErr IO Book
231231-- > getBook isbn = ...
232232instance (KnownSymbol capture, FromText a, HasServer sublayout)
233233 => HasServer (Capture capture a :> sublayout) where
@@ -253,7 +253,7 @@ instance (KnownSymbol capture, FromText a, HasServer sublayout)
253253--
254254-- The code of the handler will, just like
255255-- for 'Servant.API.Get.Get', 'Servant.API.Post.Post' and
256−-- 'Servant.API.Put.Put', run in @EitherT (Int, String) IO ()@.
256+-- 'Servant.API.Put.Put', run in @EitherT ServantErr IO ()@.
257257-- The 'Int' represents the status code and the 'String' a message
258258-- to be returned. You can use 'Control.Monad.Trans.Either.left' to
259259-- painlessly error out if the conditions for a successful deletion
@@ -329,7 +329,7 @@ instance
329329-- | When implementing the handler for a 'Get' endpoint,
330330-- just like for 'Servant.API.Delete.Delete', 'Servant.API.Post.Post'
331331-- and 'Servant.API.Put.Put', the handler code runs in the
332−-- @EitherT (Int, String) IO@ monad, where the 'Int' represents
332+-- @EitherT ServantErr IO@ monad, where the 'Int' represents
333333-- the status code and the 'String' a message, returned in case of
334334-- failure. You can quite handily use 'Control.Monad.Trans.EitherT.left'
335335-- to quickly fail if some conditions are not met.
@@ -425,7 +425,7 @@ instance
425425-- >
426426-- > server :: Server MyApi
427427-- > server = viewReferer
428−-- > where viewReferer :: Referer -> EitherT (Int, String) IO referer
428+-- > where viewReferer :: Referer -> EitherT ServantErr IO referer
429429-- > viewReferer referer = return referer
430430instance (KnownSymbol sym, FromText a, HasServer sublayout)
431431 => HasServer (Header sym a :> sublayout) where
@@ -442,7 +442,7 @@ instance (KnownSymbol sym, FromText a, HasServer sublayout)
442442-- | When implementing the handler for a 'Post' endpoint,
443443-- just like for 'Servant.API.Delete.Delete', 'Servant.API.Get.Get'
444444-- and 'Servant.API.Put.Put', the handler code runs in the
445−-- @EitherT (Int, String) IO@ monad, where the 'Int' represents
445+-- @EitherT ServantErr IO@ monad, where the 'Int' represents
446446-- the status code and the 'String' a message, returned in case of
447447-- failure. You can quite handily use 'Control.Monad.Trans.EitherT.left'
448448-- to quickly fail if some conditions are not met.
@@ -523,7 +523,7 @@ instance
523523-- | When implementing the handler for a 'Put' endpoint,
524524-- just like for 'Servant.API.Delete.Delete', 'Servant.API.Get.Get'
525525-- and 'Servant.API.Post.Post', the handler code runs in the
526−-- @EitherT (Int, String) IO@ monad, where the 'Int' represents
526+-- @EitherT ServantErr IO@ monad, where the 'Int' represents
527527-- the status code and the 'String' a message, returned in case of
528528-- failure. You can quite handily use 'Control.Monad.Trans.EitherT.left'
529529-- to quickly fail if some conditions are not met.
@@ -603,7 +603,7 @@ instance
603603-- | When implementing the handler for a 'Patch' endpoint,
604604-- just like for 'Servant.API.Delete.Delete', 'Servant.API.Get.Get'
605605-- and 'Servant.API.Put.Put', the handler code runs in the
606−-- @EitherT (Int, String) IO@ monad, where the 'Int' represents
606+-- @EitherT ServantErr IO@ monad, where the 'Int' represents
607607-- the status code and the 'String' a message, returned in case of
608608-- failure. You can quite handily use 'Control.Monad.Trans.EitherT.left'
609609-- to quickly fail if some conditions are not met.
@@ -696,7 +696,7 @@ instance
696696-- >
697697-- > server :: Server MyApi
698698-- > server = getBooksBy
699−-- > where getBooksBy :: Maybe Text -> EitherT (Int, String) IO [Book]
699+-- > where getBooksBy :: Maybe Text -> EitherT ServantErr IO [Book]
700700-- > getBooksBy Nothing = ...return all books...
701701-- > getBooksBy (Just author) = ...return books by the given author...
702702instance (KnownSymbol sym, FromText a, HasServer sublayout)
@@ -735,7 +735,7 @@ instance (KnownSymbol sym, FromText a, HasServer sublayout)
735735-- >
736736-- > server :: Server MyApi
737737-- > server = getBooksBy
738−-- > where getBooksBy :: [Text] -> EitherT (Int, String) IO [Book]
738+-- > where getBooksBy :: [Text] -> EitherT ServantErr IO [Book]
739739-- > getBooksBy authors = ...return all books by these authors...
740740instance (KnownSymbol sym, FromText a, HasServer sublayout)
741741 => HasServer (QueryParams sym a :> sublayout) where
@@ -768,7 +768,7 @@ instance (KnownSymbol sym, FromText a, HasServer sublayout)
768768-- >
769769-- > server :: Server MyApi
770770-- > server = getBooks
771−-- > where getBooks :: Bool -> EitherT (Int, String) IO [Book]
771+-- > where getBooks :: Bool -> EitherT ServantErr IO [Book]
772772-- > getBooks onlyPublished = ...return all books, or only the ones that are already published, depending on the argument...
773773instance (KnownSymbol sym, HasServer sublayout)
774774 => HasServer (QueryFlag sym :> sublayout) where
@@ -810,7 +810,7 @@ parseMatrixText = parseQueryText
810810-- >
811811-- > server :: Server MyApi
812812-- > server = getBooksBy
813−-- > where getBooksBy :: Maybe Text -> EitherT (Int, String) IO [Book]
813+-- > where getBooksBy :: Maybe Text -> EitherT ServantErr IO [Book]
814814-- > getBooksBy Nothing = ...return all books...
815815-- > getBooksBy (Just author) = ...return books by the given author...
816816instance (KnownSymbol sym, FromText a, HasServer sublayout)
@@ -849,7 +849,7 @@ instance (KnownSymbol sym, FromText a, HasServer sublayout)
849849-- >
850850-- > server :: Server MyApi
851851-- > server = getBooksBy
852−-- > where getBooksBy :: [Text] -> EitherT (Int, String) IO [Book]
852+-- > where getBooksBy :: [Text] -> EitherT ServantErr IO [Book]
853853-- > getBooksBy authors = ...return all books by these authors...
854854instance (KnownSymbol sym, FromText a, HasServer sublayout)
855855 => HasServer (MatrixParams sym a :> sublayout) where
@@ -883,7 +883,7 @@ instance (KnownSymbol sym, FromText a, HasServer sublayout)
883883-- >
884884-- > server :: Server MyApi
885885-- > server = getBooks
886−-- > where getBooks :: Bool -> EitherT (Int, String) IO [Book]
886+-- > where getBooks :: Bool -> EitherT ServantErr IO [Book]
887887-- > getBooks onlyPublished = ...return all books, or only the ones that are already published, depending on the argument...
888888instance (KnownSymbol sym, HasServer sublayout)
889889 => HasServer (MatrixFlag sym :> sublayout) where
@@ -940,7 +940,7 @@ instance HasServer Raw where
940940-- >
941941-- > server :: Server MyApi
942942-- > server = postBook
943−-- > where postBook :: Book -> EitherT (Int, String) IO Book
943+-- > where postBook :: Book -> EitherT ServantErr IO Book
944944-- > postBook book = ...insert into your db...
945945instance ( AllCTUnrender list a, HasServer sublayout
946946 ) => HasServer (ReqBody list a :> sublayout) where