Merge branch 'handle-ap-fetcher-when-not-json' into 'master'
Handle ActivityPub Fetcher returning text that's not JSON See merge request framasoft/mobilizon!861
This commit is contained in:
commit
49b4c28378
@ -59,6 +59,10 @@ defmodule Mobilizon.Federation.ActivityPub.Fetcher do
|
|||||||
Logger.warn("Object origin check failed")
|
Logger.warn("Object origin check failed")
|
||||||
{:error, "Object origin check failed"}
|
{:error, "Object origin check failed"}
|
||||||
|
|
||||||
|
# Returned content is not JSON
|
||||||
|
{:ok, data} when is_binary(data) ->
|
||||||
|
{:error, "Failed to parse content as JSON"}
|
||||||
|
|
||||||
{:error, err} ->
|
{:error, err} ->
|
||||||
{:error, err}
|
{:error, err}
|
||||||
end
|
end
|
||||||
|
Loading…
Reference in New Issue
Block a user