From: Haelwenn (lanodan) Monnier Date: Sun, 25 Aug 2019 05:10:22 +0000 (+0200) Subject: HttpRequestMock: Log mock errors as warnings X-Git-Url: https://git.squeep.com/?a=commitdiff_plain;h=18668447d268524e39d9cc8812805053ef9c186e;p=akkoma HttpRequestMock: Log mock errors as warnings --- diff --git a/test/support/http_request_mock.ex b/test/support/http_request_mock.ex index 3adb5ba3b..00f4660c1 100644 --- a/test/support/http_request_mock.ex +++ b/test/support/http_request_mock.ex @@ -17,9 +17,14 @@ defmodule HttpRequestMock do 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