Error refactors

This commit is contained in:
calebmer
2015-11-16 17:28:39 -05:00
parent aa87853e71
commit ad555986d4
5 changed files with 26 additions and 18 deletions
+2 -2
View File
@@ -6,7 +6,7 @@ import PostgREST.Config (AppConfig (..),
minimumPgVersion,
prettyVersion,
readOptions)
import PostgREST.Error (errResponse, PgError)
import PostgREST.Error (pgErrResponse, PgError)
import PostgREST.Middleware
import PostgREST.DbStructure
@@ -75,4 +75,4 @@ main = do
body <- strictRequestBody req
resOrError <- liftIO $ H.session pool $ H.tx txSettings $
runWithClaims conf (app dbStructure conf body) req
either (respond . errResponse) respond resOrError
either (respond . pgErrResponse) respond resOrError