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:
parent
047a60c46e
commit
170599c390
2 changed files with 9 additions and 6 deletions
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue