better error message
All checks were successful
ci/woodpecker/push/publish Pipeline was successful

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

View file

@ -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