From 901c24ab27fbd8352a4080115e9de0f9f4609c5c Mon Sep 17 00:00:00 2001 From: Robur Date: Wed, 9 Jun 2021 14:25:00 +0000 Subject: [PATCH] if_error: if not found, present a not found message --- lib/builder_web.ml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/builder_web.ml b/lib/builder_web.ml index 06be8b8..8534237 100644 --- a/lib/builder_web.ml +++ b/lib/builder_web.ml @@ -64,7 +64,7 @@ let if_error ?(status = `Internal_Server_Error) ?(log=(fun e -> Log.warn (fun m let* r = r in match r with | Error `Not_found -> - Lwt_result.fail (message, `Not_Found) + Lwt_result.fail ("Resource not found", `Not_Found) | Error (#Model.error as e) -> log e; Lwt_result.fail (message, status)