This commit is contained in:
parent
c95978eb8a
commit
5dc36fd9d3
1 changed files with 2 additions and 0 deletions
|
@ -38,6 +38,8 @@ let get_session ?(headless = true) () =
|
|||
let value = List.assoc "value" fields in
|
||||
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))
|
||||
| _ :: rest -> find_session_id rest
|
||||
| [] -> raise (Any "Session ID not found")
|
||||
in
|
||||
|
|
Loading…
Reference in a new issue