From 5d59dd2f88bb4419ceb55dd1bfa62c1723e2af8d Mon Sep 17 00:00:00 2001 From: bmarkons Date: Fri, 17 Jul 2020 17:22:17 +0200 Subject: [PATCH] Raise error if Cacheman.exists? can't connect to Redis --- lib/cacheman/backend/redis.ex | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/cacheman/backend/redis.ex b/lib/cacheman/backend/redis.ex index 8f68fb0..591d1ff 100644 --- a/lib/cacheman/backend/redis.ex +++ b/lib/cacheman/backend/redis.ex @@ -25,7 +25,7 @@ defmodule Cacheman.Backend.Redis do case Redix.command(c, ["EXISTS", key]) do {:ok, 1} -> true {:ok, 0} -> false - _ -> false + {:error, reason} -> raise reason end end) end