{-# OPTIONS_GHC -Wno-orphans #-}
module Lorentz.Errors.Common () where
import Fmt (Buildable(..))
import Lorentz.Errors
type instance ErrorArg "senderIsNotAdmin" = ()
instance Buildable (CustomError "senderIsNotAdmin") where
build :: CustomError "senderIsNotAdmin" -> Builder
build (CustomError _ ()) =
"This operation can be executed only by admin, but is invoked by \
\someone else"
instance CustomErrorHasDoc "senderIsNotAdmin" where
customErrClass :: ErrorClass
customErrClass = ErrorClass
ErrClassActionException
customErrDocMdCause :: Builder
customErrDocMdCause =
"Entrypoint executed not by its administrator."