Translate raise_exception to http 400

Fixes #661
This commit is contained in:
Joe Nelson
2016-07-06 21:48:32 -07:00
parent 63046baffd
commit e4cf1ce207
3 changed files with 7 additions and 1 deletions
+1
View File
@@ -86,6 +86,7 @@ httpStatus authed (P.SessionError (H.ResultError (H.ServerError c _ _ _))) =
'5':'8':_ -> HT.status500 -- system error
'F':'0':_ -> HT.status500 -- conf file error
'H':'V':_ -> HT.status500 -- foreign data wrapper error
"P0001" -> HT.status400 -- default code for "raise"
'P':'0':_ -> HT.status500 -- PL/pgSQL Error
'X':'X':_ -> HT.status500 -- internal Error
"42P01" -> HT.status404 -- undefined table