HttpRequestMock: Log mock errors as warnings

This commit is contained in:
Haelwenn (lanodan) Monnier 2019-08-25 07:10:22 +02:00
parent 90986667ce
commit 18668447d2
No known key found for this signature in database
GPG key ID: D5B7A8E43C997DEE

View file

@ -17,9 +17,14 @@ def request(
with {:ok, res} <- apply(__MODULE__, method, [url, query, body, headers]) do
res
else
{_, _r} = error ->
# Logger.warn(r)
error
error ->
error = error
with {:error, message} <- error do
Logger.warn(message)
end
{_, _r} = error
end
end