add jesse:error_to_json
Closed this issue · 3 comments
andreineculau commented
Port of klarna/jesse#38 by @Licenser
Hi, I was thinking it'd be really nice to have a pre-build function that formats the erlang error into a json error to return to the sender.
It probably can be done easily in the application using jesse but it seems such a common thing that I feel like it could be included directly?
-spec error_to_json([jesse:error()]) -> binary().
%% ...
something like that?
marutha commented
+1
andreineculau commented