From: Roger Braun Date: Tue, 20 Jun 2017 12:10:44 +0000 (+0200) Subject: Add some debugging to federations. X-Git-Url: https://git.squeep.com/?a=commitdiff_plain;h=fe27b61a726ecf328a58ecab1f31434770dfd748;p=akkoma Add some debugging to federations. --- diff --git a/lib/pleroma/web/websub/websub.ex b/lib/pleroma/web/websub/websub.ex index a683f6da4..12edf094c 100644 --- a/lib/pleroma/web/websub/websub.ex +++ b/lib/pleroma/web/websub/websub.ex @@ -53,10 +53,14 @@ defmodule Pleroma.Web.Websub do Logger.debug(fn -> "Pushing to #{sub.callback}" end) Task.start(fn -> - @httpoison.post(sub.callback, response, [ + with {:ok, %{status_code: code}} <- @httpoison.post(sub.callback, response, [ {"Content-Type", "application/atom+xml"}, {"X-Hub-Signature", "sha1=#{signature}"} - ]) + ]) do + Logger.debug(fn -> "Pushed to #{sub.callback}, code #{code}" end) + else e -> + Logger.debug(fn -> "Couldn't push to #{sub.callback}, #{inspect(e)}" end) + end end) end) end