even more precise msg ahah
All checks were successful
ci/woodpecker/push/publish Pipeline was successful
All checks were successful
ci/woodpecker/push/publish Pipeline was successful
This commit is contained in:
parent
5dc36fd9d3
commit
e7d71a2aea
1 changed files with 9 additions and 1 deletions
10
lib/net.ml
10
lib/net.ml
|
@ -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
|
||||||
|
|
Loading…
Reference in a new issue