1 {-# LANGUAGE OverloadedStrings #-} 2 module Databrary.View.Error 3 ( htmlNotFound 4 , htmlForbidden 5 ) where 6 7 import Control.Monad (void) 8 import qualified Text.Blaze.Html5 as H 9 10 import Databrary.Action.Types 11 import Databrary.View.Template 12 13 htmlNotFound :: RequestContext -> H.Html 14 htmlNotFound req = htmlTemplate req (Just "Not found") $ \_ -> do 15 void $ "The resource you requested may no longer be available." 16 17 htmlForbidden :: RequestContext -> H.Html 18 htmlForbidden req = htmlTemplate req (Just "Access denied") $ \_ -> do 19 void $ "You do not have access to the requested resource."