removing try block in tesla request
added mocks for tests which fail with Tesla.Mock.Error
This commit is contained in:
parent
eb324467d9
commit
f0753eed0f
12 changed files with 139 additions and 22 deletions
|
|
@ -173,7 +173,8 @@ defmodule Pleroma.Web.WebFinger do
|
|||
get_template_from_xml(body)
|
||||
else
|
||||
_ ->
|
||||
with {:ok, %{body: body}} <- HTTP.get("https://#{domain}/.well-known/host-meta", []) do
|
||||
with {:ok, %{body: body, status: status}} when status in 200..299 <-
|
||||
HTTP.get("https://#{domain}/.well-known/host-meta", []) do
|
||||
get_template_from_xml(body)
|
||||
else
|
||||
e -> {:error, "Can't find LRDD template: #{inspect(e)}"}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue