summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRyan Kavanagh <rak@rak.ac>2020-06-07 21:58:39 -0400
committerRyan Kavanagh <rak@rak.ac>2020-06-07 22:11:02 -0400
commit8320bbd567910566a44f407f43f510a8131bd53b (patch)
tree29878ac3081c38a9f7e380922fb514c9268c771a
parentSwitch from curses to notty (diff)
Handle tls failures as well
-rw-r--r--gemini/geminiTransaction.ml5
1 files changed, 4 insertions, 1 deletions
diff --git a/gemini/geminiTransaction.ml b/gemini/geminiTransaction.ml
index 77f1206..56cbb7f 100644
--- a/gemini/geminiTransaction.ml
+++ b/gemini/geminiTransaction.ml
@@ -241,8 +241,11 @@ struct
let%lwt () = Lwt_io.write oc (Uri.to_string r.url ^ "\r\n") in
let%lwt (_, parsed) = parse response_parser ic in
Lwt.return parsed
- with | Tls_lwt.Tls_alert alert ->
+ with
+ | Tls_lwt.Tls_alert alert ->
Lwt.return (Error (Tls.Packet.alert_type_to_string alert))
+ | Tls_lwt.Tls_failure failure ->
+ Lwt.return (Error (Tls.Engine.string_of_failure failure))
let rec session req =
match%lwt transaction req with