+ better ErrorDetail
This commit is contained in:
parent
28d69de95a
commit
153ee78260
2 changed files with 74 additions and 20 deletions
|
|
@ -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
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue