avoid Result.get_ok, as suggested by @reynir, to preserve the error
This commit is contained in:
parent
45657fdf32
commit
cb37018a84
1 changed files with 1 additions and 2 deletions
|
@ -332,8 +332,7 @@ let of_octets ctx ~remote data =
|
||||||
Lwt.catch
|
Lwt.catch
|
||||||
(fun () ->
|
(fun () ->
|
||||||
init_store () >|=
|
init_store () >|=
|
||||||
Result.map_error (Fmt.to_to_string Store.pp_error) >|=
|
Result.fold ~ok:Fun.id ~error:(function `Msg msg -> failwith msg) >>= fun store ->
|
||||||
Result.get_ok >>= fun store ->
|
|
||||||
analyze store data >>= fun head ->
|
analyze store data >>= fun head ->
|
||||||
let edn, branch = split_url remote in
|
let edn, branch = split_url remote in
|
||||||
Lwt.return_ok { ctx ; edn ; branch ; store ; committed= None; in_closure= false; head; })
|
Lwt.return_ok { ctx ; edn ; branch ; store ; committed= None; in_closure= false; head; })
|
||||||
|
|
Loading…
Reference in a new issue