diff --git a/lib/request_cache/plug.ex b/lib/request_cache/plug.ex index 0583c20..5d8b3e1 100644 --- a/lib/request_cache/plug.ex +++ b/lib/request_cache/plug.ex @@ -285,6 +285,7 @@ defmodule RequestCache.Plug do Logger.error( "[RequestCache.Plug] recieved an error from #{inspect(request_cache_module(conn, opts))}", + # credo:disable-for-next-line [crash_reason: {error, stacktrace}] ) end diff --git a/test/request_cache_plug_test.exs b/test/request_cache_plug_test.exs index 28a64a9..a4c75a3 100644 --- a/test/request_cache_plug_test.exs +++ b/test/request_cache_plug_test.exs @@ -270,7 +270,8 @@ defmodule RequestCachePlugTest do assert expected_cached_headers === [ {"cache-control", "max-age=0, private, must-revalidate"}, {"content-type", "text/html; charset=utf-8"}, - {"rc-cache-status", "HIT"} + {"rc-cache-status", "HIT"}, + {"rc-cache-key", "/my_route/cache:D41D8CD98F00B204E9800998ECF8427E"} ] end @@ -297,7 +298,8 @@ defmodule RequestCachePlugTest do assert expected_cached_headers === [ {"cache-control", "max-age=0, private, must-revalidate"}, {"content-type", "text/html; charset=utf-8"}, - {"rc-cache-status", "HIT"} + {"rc-cache-status", "HIT"}, + {"rc-cache-key", "/error-route/all-errors-enabled:D41D8CD98F00B204E9800998ECF8427E"} ] end end