add not_implemented handler

This commit is contained in:
swrup 2026-03-30 10:03:08 +02:00 committed by Swrup
parent f3483594ac
commit 18c4f0b3d5
4 changed files with 38 additions and 3 deletions

View file

@ -56,6 +56,11 @@ let error req err =
Logs.err (fun m -> m "%s: %s" (status_to_string status) hint);
respond_json req Api.ErrorDetail.jsont status body
let not_implemented req =
Logs.debug (fun m -> m "Not implemented");
let body = error_detail "Not Implemented" in
respond_json req Api.ErrorDetail.jsont `Not_implemented body
let result req jsont res =
match res with Error e -> error req e | Ok body -> ok req jsont body