Skip to content

Commit

Permalink
Use lenient decode just in case server error messages bring some inva…
Browse files Browse the repository at this point in the history
…lid UTF8
  • Loading branch information
diogob committed Mar 13, 2024
1 parent 61c7c55 commit b51d479
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/Hasql/Notifications.hs
Original file line number Diff line number Diff line change
Expand Up @@ -183,7 +183,7 @@ waitForNotifications sendNotification con =
result <- PQ.consumeInput pqCon
unless result $ do
mError <- PQ.errorMessage pqCon
panic $ maybe "Error checking for PostgreSQL notifications" (T.unpack . T.decodeUtf8) mError
panic $ maybe "Error checking for PostgreSQL notifications" (T.unpack . T.decodeUtf8Lenient) mError

Check failure on line 186 in src/Hasql/Notifications.hs

View workflow job for this annotation

GitHub Actions / stack / ubuntu-latest / ghc 8.10.4

Not in scope: ‘T.decodeUtf8Lenient’
Just notification ->
sendNotification (PQ.notifyRelname notification) (PQ.notifyExtra notification)
panic :: String -> a
Expand Down

0 comments on commit b51d479

Please sign in to comment.