Safe Haskell | Safe-Inferred |
---|---|
Language | GHC2021 |
Synopsis
- class FeatureError e where
- handleFeatureError :: MonadIO m => e -> ActionT m ()
- handleDBError :: DBError -> e
- handleFeatureErrors :: (MonadUnliftIO m, FeatureError e) => e -> ActionT m a
- class FeatureErrorMapper e1 e2 where
- mapFeatureError :: e1 -> e2
Documentation
class FeatureError e where Source #
handleFeatureError :: MonadIO m => e -> ActionT m () Source #
Converts a feature error into some scotty response
handleDBError :: DBError -> e Source #
Converts a DBError into some feature error
Instances
FeatureError AccountError Source # | |
Defined in Conduit.Features.Account.Errors handleFeatureError :: forall (m :: Type -> Type). MonadIO m => AccountError -> ActionT m () Source # handleDBError :: DBError -> AccountError Source # | |
FeatureError ArticleError Source # | |
Defined in Conduit.Features.Articles.Errors handleFeatureError :: forall (m :: Type -> Type). MonadIO m => ArticleError -> ActionT m () Source # handleDBError :: DBError -> ArticleError Source # |
handleFeatureErrors :: (MonadUnliftIO m, FeatureError e) => e -> ActionT m a Source #
Converts a feature error to its appropriate error response. See runService
.
class FeatureErrorMapper e1 e2 where Source #
Provides an easy way for errors to translate between features to facilitate cross-feature code sharing
mapFeatureError :: e1 -> e2 Source #