From f78267a4bb0e78d964d0c9fff63931600d82d5f1 Mon Sep 17 00:00:00 2001 From: Clombrong Date: Wed, 11 Jun 2025 00:07:05 +0200 Subject: feat(auth): parse auth response and return appropriate result --- test/js/websockets_hello.ml | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'test') diff --git a/test/js/websockets_hello.ml b/test/js/websockets_hello.ml index 8af5a5e..9043501 100644 --- a/test/js/websockets_hello.ml +++ b/test/js/websockets_hello.ml @@ -21,7 +21,10 @@ let main (stream, push) = in let+ _auth = Auth.send_auth_stanza (stream, push) "test@example.com" "password" Auth.PLAIN - in push None + in push None; + match _auth with + | Error (NotAuthorized, Some ("en", text)) -> print_endline text + | _ -> () let () = run @@ -- cgit v1.2.3