fix(users/Profpatsch/whatcd-resolver): better show ApplicationError

Change-Id: I7a1087afc4000299529a7518f273bfee8d651c72
Reviewed-on: https://cl.tvl.fyi/c/depot/+/12054
Reviewed-by: Profpatsch <mail@profpatsch.de>
Tested-by: BuildkiteCI
This commit is contained in:
Profpatsch 2024-07-29 11:11:39 +02:00
parent 8aa038a90e
commit 1f65a7b0d0

View file

@ -33,10 +33,12 @@ data Context = Context
newtype AppT m a = AppT {unAppT :: ReaderT Context m a}
deriving newtype (Functor, Applicative, Monad, MonadIO, MonadUnliftIO, MonadThrow)
data AppException = AppException Text
deriving stock (Show)
newtype AppException = AppException Text
deriving anyclass (Exception)
instance Show AppException where
showsPrec _ (AppException t) = ("AppException: "++) . (textToString t++)
-- * Logging & Opentelemetry
instance (MonadIO m) => MonadLogger (AppT m) where