Change JSON-specific error message to a more general one

This commit is contained in:
Christian Marie 2015-03-05 12:11:20 +11:00
parent b24822a448
commit 0be89b4f3d

View file

@ -71,7 +71,7 @@ toApplication ra request respond = do
routingRespond (Left WrongMethod) =
respond $ responseLBS methodNotAllowed405 [] "method not allowed"
routingRespond (Left (InvalidBody err)) =
respond $ responseLBS badRequest400 [] $ fromString $ "Invalid JSON in request body: " ++ err
respond $ responseLBS badRequest400 [] $ fromString $ "invalid request body: " ++ err
routingRespond (Left UnsupportedMediaType) =
respond $ responseLBS unsupportedMediaType415 [] "unsupported media type"
routingRespond (Left (HttpError status body)) =