module Gamgee.Effects.Error
( EffError(..)
) where
import qualified Crypto.Error as CE
import qualified Gamgee.Token as Token
import Relude
data EffError = AlreadyExists Token.TokenIdentifier
| NoSuchToken Token.TokenIdentifier
| CryptoError CE.CryptoError
| CorruptIV ByteString
| CorruptBase64Encoding Text
| SecretDecryptError Text
| InvalidTokenPeriod Token.TokenPeriod
| UnsupportedConfigVersion Word32
| JSONDecodeError Text
deriving stock (Int -> EffError -> ShowS
[EffError] -> ShowS
EffError -> String
(Int -> EffError -> ShowS)
-> (EffError -> String) -> ([EffError] -> ShowS) -> Show EffError
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [EffError] -> ShowS
$cshowList :: [EffError] -> ShowS
show :: EffError -> String
$cshow :: EffError -> String
showsPrec :: Int -> EffError -> ShowS
$cshowsPrec :: Int -> EffError -> ShowS
Show, EffError -> EffError -> Bool
(EffError -> EffError -> Bool)
-> (EffError -> EffError -> Bool) -> Eq EffError
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: EffError -> EffError -> Bool
$c/= :: EffError -> EffError -> Bool
== :: EffError -> EffError -> Bool
$c== :: EffError -> EffError -> Bool
Eq)