module Network.Goggles.Control.Exceptions (
KeyException(..)
, JWTError(..)
, TokenExchangeException(..)
, CloudException(..)
)where
import Control.Exception
import Data.Typeable
data KeyException =
NoSecretFound !String
| NoParsePK !String
| NoRSAKey !String
deriving (Eq, Show, Typeable)
instance Exception KeyException
data JWTError =
BadExpirationTime !String
| CryptoSignError !String
deriving (Show, Typeable)
instance Exception JWTError where
data TokenExchangeException =
NotFound !String
| APICredentialsNotFound !String
deriving (Show, Typeable)
instance Exception TokenExchangeException
data CloudException =
UnknownError !String
| IOError !String
| TimeoutError !String
| JsonDecodeError !String
| XMLDecodeError !String
deriving (Show, Typeable)
instance Exception CloudException