Browse Source

builder-web: Inform expected version on wrong ver. (#121)

Reviewed-on: https://git.robur.io/robur/builder-web/pulls/121
Co-authored-by: Reynir Björnsson <reynir@reynir.dk>
Co-committed-by: Reynir Björnsson <reynir@reynir.dk>
pull/123/head
Reynir Björnsson 2 months ago
parent
commit
0be38475b7
  1. 4
      lib/builder_web.ml

4
lib/builder_web.ml

@ -9,8 +9,8 @@ let pp_error ppf = function
| #Model.error as e -> Model.pp_error ppf e
| `Wrong_version (application_id, version) ->
if application_id = Builder_db.application_id
then Format.fprintf ppf "Wrong database version: %Ld" version
else Format.fprintf ppf "Wrong database application id: %ld" application_id
then Format.fprintf ppf "Wrong database version: %Ld, expected %Ld" version Builder_db.current_version
else Format.fprintf ppf "Wrong database application id: %ld, expected %ld" application_id Builder_db.application_id
let init_datadir datadir =
let ( let* ) = Result.bind and ( let+ ) x f = Result.map f x in

Loading…
Cancel
Save