Skip to content

Open source, privacy-first web analytics. Lightweight, cookie-free Google Analytics alternative. Self-hosted or cloud.

Capture no_cache sentry messages together (#2772)

Adam736e6e385c45
diff --git a/lib/plausible/site/cache.ex b/lib/plausible/site/cache.ex
index 183b853a40..9fe6e2c13d 100644
--- a/lib/plausible/site/cache.ex
+++ b/lib/plausible/site/cache.ex
@@ -169,9 +169,7 @@ defmodule Plausible.Site.Cache do
site
{:error, e} ->
- Logger.error(
- "Error retrieving '#{domain}' from '#{inspect(cache_name)}': #{inspect(e)}"
- )
+ Logger.error("Error retrieving domain from '#{inspect(cache_name)}': #{inspect(e)}")
nil
end
diff --git a/test/plausible/site/cache_test.exs b/test/plausible/site/cache_test.exs
index 0a88de0414..f7e5ceee70 100644
--- a/test/plausible/site/cache_test.exs
+++ b/test/plausible/site/cache_test.exs
@@ -23,7 +23,7 @@ defmodule Plausible.Site.CacheTest do
assert Cache.get("key", force?: true, cache_name: NonExistingCache) == nil
end)
- assert log =~ "Error retrieving 'key' from 'NonExistingCache': :no_cache"
+ assert log =~ "Error retrieving domain from 'NonExistingCache': :no_cache"
end
test "cache caches", %{test: test} do