diff --git a/src/PostgREST/Main.hs b/src/PostgREST/Main.hs index 8e6506e1a..fd1489b07 100644 --- a/src/PostgREST/Main.hs +++ b/src/PostgREST/Main.hs @@ -101,5 +101,5 @@ main = do Left err -> return $ errResponse HT.status500 (cs . show $ err) Right c -> do resOrError <- handleReq c - either (return . pgErrResponse) return resOrError + return $ either pgErrResponse id resOrError respond res