+ better ErrorDetail

This commit is contained in:
swrup 2025-12-06 18:32:31 +01:00
parent 28d69de95a
commit 153ee78260
2 changed files with 74 additions and 20 deletions

View file

@ -17,7 +17,8 @@ module Respond_with = struct
let error_detail ?hint _status =
let open Api in
let code = -1 in
let s = encode_exn ErrorDetail.jsont { code; hint } in
let err = ErrorDetail.make ?hint code in
let s = encode_exn ErrorDetail.jsont err in
s
end