yesod-auth-oauth2/src/Yesod/Auth/OAuth2/Exception.hs
patrick brisbin 18bd22fdc8
Move Exception to its own module
This will avoid cycles later.
2018-09-18 10:42:02 -04:00

20 lines
531 B
Haskell

{-# LANGUAGE DeriveDataTypeable #-}
module Yesod.Auth.OAuth2.Exception
( YesodOAuth2Exception(..)
) where
import Control.Exception.Safe
import qualified Data.ByteString.Lazy as BL
import Data.Text (Text)
-- | Provider name and error
--
-- The error is a lazy bytestring because it's most often encoded JSON.
--
-- Deprecated. Eventually, we'll return @Either@s all the way up.
--
data YesodOAuth2Exception = InvalidProfileResponse Text BL.ByteString
deriving (Show, Typeable)
instance Exception YesodOAuth2Exception