From: Christophe Romain Date: Thu, 2 May 2019 10:05:20 +0000 (+0200) Subject: Fix typo and remove forgotten log from 492da2ba X-Git-Tag: 19.05~40 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=f7bc969729a211033e503ba89c07efd7931782e5;p=ejabberd Fix typo and remove forgotten log from 492da2ba --- diff --git a/src/rest.erl b/src/rest.erl index b8e3c3f6d..05d1b9d4a 100644 --- a/src/rest.erl +++ b/src/rest.erl @@ -31,8 +31,6 @@ put/4, patch/4, request/6, with_retry/4, opt_type/1]). --include("logger.hrl"). - -define(HTTP_TIMEOUT, 10000). -define(CONNECT_TIMEOUT, 8000). -define(CONTENT_TYPE, "application/json"). @@ -81,7 +79,7 @@ patch(Server, Path, Params, Content) -> request(Server, Method, Path, _Params, _Mime, {error, Error}) -> ejabberd_hooks:run(backend_api_error, Server, - [Server, Method, Path, Error]); + [Server, Method, Path, Error]), {error, Error}; request(Server, Method, Path, Params, Mime, Data) -> {Query, Opts} = case Params of @@ -151,10 +149,6 @@ to_list(V) when is_list(V) -> encode_json(Content) -> case catch jiffy:encode(Content) of {'EXIT', Reason} -> - ?ERROR_MSG("HTTP content encodage failed:~n" - "** Content = ~p~n" - "** Err = ~p", - [Content, Reason]), {error, {invalid_payload, Content, Reason}}; Encoded -> Encoded