RichMedia: do not log webpages missing metadata as errors

Also fixes the return value of Parser.parse on errors, previously
was just `:ok` due to the logger call in the end
This commit is contained in:
rinpatch 2020-09-05 22:00:51 +03:00
commit 170599c390
2 changed files with 9 additions and 6 deletions

View file

@ -66,9 +66,7 @@ defmodule Pleroma.Web.RichMedia.ParserTest do
end
test "doesn't just add a title" do
assert Parser.parse("http://example.com/non-ogp") ==
{:error,
"Found metadata was invalid or incomplete: %{\"url\" => \"http://example.com/non-ogp\"}"}
assert {:error, {:invalid_metadata, _}} = Parser.parse("http://example.com/non-ogp")
end
test "parses ogp" do