fix: fix wrong http status on pg error 42P17 infinite recursion
This commit is contained in:
committed by
Steve Chavez
parent
80f83f0366
commit
88abf600c4
@@ -489,6 +489,7 @@ pgErrorStatus authed (SQL.SessionUsageError (SQL.QueryError _ _ (SQL.ResultError
|
||||
then HTTP.status406
|
||||
else HTTP.status404 -- undefined function
|
||||
"42P01" -> HTTP.status404 -- undefined table
|
||||
"42P17" -> HTTP.status500 -- infinite recursion
|
||||
"42501" -> if authed then HTTP.status403 else HTTP.status401 -- insufficient privilege
|
||||
'P':'T':n -> fromMaybe HTTP.status500 (HTTP.mkStatus <$> readMaybe n <*> pure m)
|
||||
"PGRST" ->
|
||||
|
||||
Reference in New Issue
Block a user