From fc2dfb0f1d667a7127e5394034abfa5659cbeefa Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Micka=C3=ABl=20R=C3=A9mond?= Date: Fri, 17 May 2019 11:10:41 +0200 Subject: [PATCH] Better error handling --- ejabberd_auth_http/src/ejabberd_auth_http.erl | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/ejabberd_auth_http/src/ejabberd_auth_http.erl b/ejabberd_auth_http/src/ejabberd_auth_http.erl index a665f9e..6c9bd63 100644 --- a/ejabberd_auth_http/src/ejabberd_auth_http.erl +++ b/ejabberd_auth_http/src/ejabberd_auth_http.erl @@ -237,9 +237,11 @@ make_req(Method, Path, LUser, LServer, Password) -> <<"401">> -> {error, not_authorized}; <<"403">> -> {error, not_allowed}; <<"400">> -> {error, RespBody}; + <<"503">> -> {error, RespBody}; <<"204">> -> {ok, <<"">>}; <<"201">> -> {ok, created}; - <<"200">> -> {ok, RespBody} + <<"200">> -> {ok, RespBody}; + _ -> {error, RespBody} end. %%%----------------------------------------------------------------------