diff --git a/src/http_handler/http_protocol.erl b/src/http_handler/http_protocol.erl index 6f829f4..b24140d 100644 --- a/src/http_handler/http_protocol.erl +++ b/src/http_handler/http_protocol.erl @@ -47,7 +47,7 @@ init(Req0, Opts = [Mod|_]) -> {ok, Req2, Opts}; _:Error:Stack -> logger:warning("[http_handler] get error: ~p, stack: ~p", [Error, Stack]), - ErrorBin = term_to_binary(Error), + ErrorBin = sdlan_util:term_to_binary(Error), Req2 = cowboy_req:reply(500, #{ <<"Content-Type">> => <<"text/html;charset=utf-8">> }, <<"Internal Server Error: ", ErrorBin/binary>>, Req1),