From e7d71a2aea71b5bd98b107377f65caea46c8b2e3 Mon Sep 17 00:00:00 2001 From: Mylloon Date: Sat, 9 Mar 2024 14:56:18 +0100 Subject: [PATCH] even more precise msg ahah --- lib/net.ml | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/lib/net.ml b/lib/net.ml index 007f65f..57cab53 100644 --- a/lib/net.ml +++ b/lib/net.ml @@ -39,7 +39,15 @@ let get_session ?(headless = true) () = let rec find_session_id = function | ("sessionId", `String session_id) :: _ -> session_id | ("error", `String err) :: ("message", `String msg) :: _ -> - raise (Any (Printf.sprintf "%s - %s" err msg)) + let msg' = + if Base.String.substr_index + msg + ~pattern:"unable to find binary in default location" + <> None + then msg ^ ". Maybe you need to install a navigator?" + else msg + in + raise (Any (Printf.sprintf "%s - %s" err msg')) | _ :: rest -> find_session_id rest | [] -> raise (Any "Session ID not found") in