]> granicus.if.org Git - ejabberd/commitdiff
Flatten strings in ejabberd_xmlrpc error results
authorBadlop <badlop@process-one.net>
Fri, 18 Oct 2019 09:52:03 +0000 (11:52 +0200)
committerBadlop <badlop@process-one.net>
Fri, 18 Oct 2019 11:16:37 +0000 (13:16 +0200)
src/ejabberd_xmlrpc.erl

index 6e67dc4c49942a8f1ef4349ea15978311940df4f..9b4b119b60133112510aaa2322e5131f36323d93 100644 (file)
@@ -342,8 +342,12 @@ process_unicode_codepoints(Str) ->
 %% Result
 %% -----------------------------
 
+format_result({error, Error}, _) when is_list(Error) ->
+    throw({error, lists:flatten(Error)});
 format_result({error, Error}, _) ->
     throw({error, Error});
+format_result({error, _Type, _Code, Error}, _) when is_list(Error) ->
+    throw({error, lists:flatten(Error)});
 format_result({error, _Type, _Code, Error}, _) ->
     throw({error, Error});
 format_result(String, string) -> lists:flatten(String);