diff --git a/Yesod/Fay.hs b/Yesod/Fay.hs
--- a/Yesod/Fay.hs
+++ b/Yesod/Fay.hs
@@ -93,6 +93,7 @@
 import           Language.Fay.FFI           (Foreign)
 import           Language.Fay.Types         (CompileConfig,
                                              configDirectoryIncludes,
+                                             addConfigDirectoryIncludes,
                                              configTypecheck)
 import           Language.Fay.Yesod         (Returns (Returns))
 import           Language.Haskell.TH.Syntax (Exp (LitE), Lit (StringL),
@@ -109,6 +110,7 @@
                                              mkYesodSub, parseRoutes,
                                              toMasterHandler, toWidget)
 import           Yesod.Form.Jquery          (YesodJquery (..))
+import           Yesod.Handler              (invalidArgs)
 import           Yesod.Json                 (jsonToRepJson)
 
 -- | Type class for applications using Fay.
@@ -197,7 +199,7 @@
     runCommandHandler f = do
         mtxt <- lookupPostParam "json"
         case mtxt of
-            Nothing -> error "No JSON provided"
+            Nothing -> invalidArgs ["No JSON provided"]
             Just txt ->
                 case decode (L.fromChunks [encodeUtf8 txt]) >>= readFromFay of
                     Nothing -> error $ "Unable to parse input: " ++ show txt
@@ -251,9 +253,7 @@
     fp = mkfp name
 
 config :: CompileConfig
-config = def
-    { configDirectoryIncludes = ["fay", "fay-shared"]
-    }
+config = addConfigDirectoryIncludes ["fay", "fay-shared"] def
 
 -- | Performs no type checking on the Fay code. Each time the widget is
 -- requested, the Fay code will be compiled from scratch to Javascript.
diff --git a/yesod-fay.cabal b/yesod-fay.cabal
--- a/yesod-fay.cabal
+++ b/yesod-fay.cabal
@@ -2,7 +2,7 @@
 -- documentation, see http://haskell.org/cabal/users-guide/
 
 name:                yesod-fay
-version:             0.1.1
+version:             0.2.0
 synopsis:            Utilities for using the Fay Haskell-to-JS compiler with Yesod.
 description:         For initial discussion, see <http://www.yesodweb.com/blog/2012/10/yesod-fay-js>. This is a work-in-progress.
 homepage:            https://github.com/snoyberg/yesod-fay
