diff --git a/src/Servant/API/ReqBody.hs b/src/Servant/API/ReqBody.hs index 70bba000..8cc1353f 100644 --- a/src/Servant/API/ReqBody.hs +++ b/src/Servant/API/ReqBody.hs @@ -26,7 +26,7 @@ instance (FromJSON a, HasServer sublayout) route Proxy subserver request respond = do mrqbody <- decode' <$> lazyRequestBody request case mrqbody of - Nothing -> respond $ failWith NotFound + Nothing -> respond $ failWith InvalidBody Just v -> route (Proxy :: Proxy sublayout) (subserver v) request respond instance (ToJSON a, HasClient sublayout)