From 01ab540ffe1419798fdb4932b68abf7808d75926 Mon Sep 17 00:00:00 2001 From: Diogo Biazus Date: Wed, 17 Feb 2016 10:30:19 -0500 Subject: [PATCH] Simplify return from withResource in Main.hs --- src/PostgREST/Main.hs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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