diff --git a/CHANGELOG.md b/CHANGELOG.md index 4110f7f4d..f256e2140 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -18,6 +18,7 @@ This project adheres to [Semantic Versioning](http://semver.org/). ### Fixed - #2791, Fix dropping schema cache reload notifications - @steve-chavez + - #2801, Stop retrying connection when "no password supplied" - @steve-chavez ## [11.0.1] - 2023-04-27 diff --git a/src/PostgREST/Error.hs b/src/PostgREST/Error.hs index 810bf4031..7e144752a 100644 --- a/src/PostgREST/Error.hs +++ b/src/PostgREST/Error.hs @@ -450,7 +450,7 @@ checkIsFatal :: SQL.UsageError -> Maybe Text checkIsFatal (SQL.ConnectionUsageError e) | isAuthFailureMessage = Just $ toS failureMessage | otherwise = Nothing - where isAuthFailureMessage = "FATAL: password authentication failed" `isInfixOf` failureMessage + where isAuthFailureMessage = or ["FATAL: password authentication failed" `isInfixOf` failureMessage, "no password supplied" `isInfixOf` failureMessage ] failureMessage = BS.unpack $ fromMaybe mempty e checkIsFatal(SQL.SessionUsageError (SQL.QueryError _ _ (SQL.ResultError serverError))) = case serverError of