even more precise msg ahah
All checks were successful
ci/woodpecker/push/publish Pipeline was successful

This commit is contained in:
Mylloon 2024-03-09 14:56:18 +01:00
parent 5dc36fd9d3
commit e7d71a2aea
Signed by: Anri
GPG key ID: A82D63DFF8D1317F

View file

@ -39,7 +39,15 @@ let get_session ?(headless = true) () =
let rec find_session_id = function let rec find_session_id = function
| ("sessionId", `String session_id) :: _ -> session_id | ("sessionId", `String session_id) :: _ -> session_id
| ("error", `String err) :: ("message", `String msg) :: _ -> | ("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 | _ :: rest -> find_session_id rest
| [] -> raise (Any "Session ID not found") | [] -> raise (Any "Session ID not found")
in in