From 23aac914df13f759af44f0c3174e13e961a2d221 Mon Sep 17 00:00:00 2001 From: Thomas Citharel Date: Wed, 7 Nov 2018 16:30:55 +0100 Subject: [PATCH] Handle webfinger jason issues Signed-off-by: Thomas Citharel --- lib/service/web_finger/web_finger.ex | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/service/web_finger/web_finger.ex b/lib/service/web_finger/web_finger.ex index 47761a14..746bfc7c 100644 --- a/lib/service/web_finger/web_finger.ex +++ b/lib/service/web_finger/web_finger.ex @@ -98,8 +98,8 @@ defmodule Mobilizon.Service.WebFinger do [Accept: "application/json, application/activity+json, application/jrd+json"], follow_redirect: true ), - %{status_code: status_code, body: body} when status_code in 200..299 <- response do - {:ok, doc} = Jason.decode(body) + %{status_code: status_code, body: body} when status_code in 200..299 <- response, + {:ok, doc} <- Jason.decode(body) do webfinger_from_json(doc) else e ->