realworld-hs-0.1.0.0: Scotty impl of https://github.com/gothinkster/realworld
Safe HaskellSafe-Inferred
LanguageGHC2021

Conduit.Errors

Synopsis

Documentation

class FeatureError e where Source #

Methods

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

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

Methods

mapFeatureError :: e1 -> e2 Source #