From eb8d973c3c22e34d0bca72accea2aebade639947 Mon Sep 17 00:00:00 2001 From: Pau Ruiz Safont Date: Tue, 1 Oct 2024 12:53:32 +0100 Subject: [PATCH] http-lib: add backtrace to logs on connection without response Signed-off-by: Pau Ruiz Safont --- ocaml/libs/http-lib/http_client.ml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/ocaml/libs/http-lib/http_client.ml b/ocaml/libs/http-lib/http_client.ml index 8e8c5cd2d44..c79141ffd88 100644 --- a/ocaml/libs/http-lib/http_client.ml +++ b/ocaml/libs/http-lib/http_client.ml @@ -188,6 +188,9 @@ let response_of_fd ?(use_fastpath = false) fd = | Unix.Unix_error (_, _, _) as e -> raise e | e -> + Backtrace.is_important e ; + let bt = Backtrace.get e in + Debug.log_backtrace e bt ; D.debug "%s: returning no response because of the exception: %s" __FUNCTION__ (Printexc.to_string e) ; None