module Conduit.Errors where
import {-# SOURCE #-} Conduit.DB.Core (DBError)
import Conduit.Utils ((>->))
import UnliftIO (MonadUnliftIO)
import Web.Scotty.Trans (ActionT, finish)
class FeatureError e where
handleFeatureError :: (MonadIO m) => e -> ActionT m ()
handleDBError :: DBError -> e
handleFeatureErrors :: (MonadUnliftIO m, FeatureError e) => e -> ActionT m a
handleFeatureErrors :: forall (m :: * -> *) e a.
(MonadUnliftIO m, FeatureError e) =>
e -> ActionT m a
handleFeatureErrors = e -> ActionT m ()
forall e (m :: * -> *).
(FeatureError e, MonadIO m) =>
e -> ActionT m ()
forall (m :: * -> *). MonadIO m => e -> ActionT m ()
handleFeatureError (e -> ActionT m ()) -> ActionT m a -> e -> ActionT m a
forall (m :: * -> *) a b c.
Monad m =>
(a -> m b) -> m c -> a -> m c
>-> ActionT m a
forall (m :: * -> *) a. Monad m => ActionT m a
finish
class FeatureErrorMapper e1 e2 where
mapFeatureError :: e1 -> e2