Skip to content

Commit

Permalink
improve message for authentication errors (#105)
Browse files Browse the repository at this point in the history
* improve message for authentication errors

* use newer opam images for build

* add upper bound on conduit
  • Loading branch information
Anurag Soni committed Feb 25, 2021
1 parent e408363 commit 8d5ca02
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 5 deletions.
4 changes: 2 additions & 2 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ version: 2.1
jobs:
build:
docker:
- image: ocaml/opam2:4.09
- image: ocaml/opam:alpine-ocaml-4.11
environment:
PGUSER: pgx
PGDATABASE: pgx-test
Expand Down Expand Up @@ -67,7 +67,7 @@ jobs:

build_mirage:
docker:
- image: ocaml/opam2:4.09
- image: ocaml/opam:alpine-ocaml-4.11
environment:
TERM: xterm
steps:
Expand Down
5 changes: 4 additions & 1 deletion dune-project
Original file line number Diff line number Diff line change
Expand Up @@ -152,7 +152,10 @@
(>= 4.08))
logs
mirage-channel
(conduit-mirage (>= 2.2.0))
(conduit-mirage
(and
(>= 2.2.0)
(< 2.3.0)))
dns-client
mirage-random
mirage-time
Expand Down
3 changes: 2 additions & 1 deletion pgx/src/pgx.ml
Original file line number Diff line number Diff line change
Expand Up @@ -641,7 +641,8 @@ module Make (Thread : Io) = struct
loop (Some (Message_out.Password password))
| Message_in.AuthenticationSCMCredential ->
fail_msg "Pgx: SCM Credential authentication not supported"
| Message_in.ErrorResponse err -> pg_error ~conn err
| Message_in.ErrorResponse err ->
raise (PostgreSQL_Error ("Failed to authenticate with postgres server", err))
| Message_in.NoticeResponse _ ->
(* XXX Do or print something here? *)
loop None
Expand Down
2 changes: 1 addition & 1 deletion pgx_lwt_mirage.opam
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ depends: [
"ocaml" {>= "4.08"}
"logs"
"mirage-channel"
"conduit-mirage" {>= "2.2.0"}
"conduit-mirage" {>= "2.2.0" & < "2.3.0"}
"dns-client"
"mirage-random"
"mirage-time"
Expand Down

0 comments on commit 8d5ca02

Please sign in to comment.