8000 Handling errors in describe statement · postgres-haskell/postgres-wire@384900d · GitHub
[go: up one dir, main page]

Skip to content
8000

Commit 384900d

Browse files
Handling errors in describe statement
1 parent 8e816e5 commit 384900d

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

src/Database/PostgreSQL/Driver/Query.hs

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -118,6 +118,8 @@ describeStatement conn stmt = do
118118
-> Right (params, V.empty)
119119
[ParameterDescription params, RowDescription fields]
120120
-> Right (params, fields)
121-
xs -> maybe (error "Impossible happened") (Left . PostgresError )
122-
$ findFirstError xs
121+
xs -> Left . maybe
122+
(DecodeError "Unexpected response on describe query")
123+
PostgresError
124+
$ findFirstError xs
123125

0 commit comments

Comments
 (0)
0