Skip to content

Commit

Permalink
idb: stick to javascript errors
Browse files Browse the repository at this point in the history
  • Loading branch information
voodoos committed Feb 17, 2024
1 parent c84b1d8 commit 11279da
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion lib/brrer/indexed_db.ml
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ module Request = struct
let fut t =
let result_fut, set = Fut.create () in
let _ = on_success ~f:(fun _ t -> set (Ok (result t))) t in
let _ = on_error ~f:(fun _ t -> set (Error (`Jv (error t)))) t in
let _ = on_error ~f:(fun _ t -> set (Error (error t))) t in
result_fut
end

Expand Down
2 changes: 1 addition & 1 deletion lib/brrer/indexed_db.mli
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ module Request : sig
val result : 'a t -> 'a
val on_success : f:(Ev.Type.void Ev.t -> 'a t -> unit) -> 'a t -> 'a t
val on_error : f:(Ev.Type.void Ev.t -> 'a t -> unit) -> 'a t -> 'a t
val fut : 'a t -> ('a, [> `Jv of Jv.Error.t ]) Fut.result
val fut : 'a t -> 'a Fut.or_error
end

module type Key = sig
Expand Down

0 comments on commit 11279da

Please sign in to comment.