server: Don’t expose DB implementation in error message (#4294)

This commit is contained in:
Francisco Sales 2020-04-08 08:36:56 +01:00 committed by GitHub
parent b948e26751
commit b02cd336d0
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 2 additions and 1 deletions

View File

@ -19,6 +19,7 @@ The order and collapsed state of columns is now persisted across page navigation
- console: decouple data rows and count fetch in data browser to account for really large tables (close #3793) (#4269)
- docs: add One-Click Render deployment guide (close #3683) (#4209)
- server: reserved keywords in column references break parser (fix #3597) #3927
- server: fix postgres specific error message that exposed database type on invalid query parameters (#4294)
## `v1.2.0-beta.3`

View File

@ -111,7 +111,7 @@ defaultTxErrorHandler = mkTxErrorHandler (const False)
mkTxErrorHandler :: (PGErrorType -> Bool) -> Q.PGTxErr -> QErr
mkTxErrorHandler isExpectedError txe = fromMaybe unexpectedError expectedError
where
unexpectedError = (internalError "postgres query error") { qeInternal = Just $ J.toJSON txe }
unexpectedError = (internalError "database query error") { qeInternal = Just $ J.toJSON txe }
expectedError = uncurry err400 <$> do
errorDetail <- Q.getPGStmtErr txe
message <- Q.edMessage errorDetail