Undefined method `each' for nil:NilClass (NoMethodError) when Memcached is unavailable

240 Views Asked by At

My production application uses Memcachier as a cache store for Rails. The client is dalli and it's configured in my application using :dalli_store and the memcachier gem.

If Memcachier is down in my logs I can see the following error:

app error: undefined methodeach' for nil:NilClass (NoMethodError) `

Exceptional doesn't warn me of those exceptions.

Is there a way to make the app more resilient and avoid that exception?

0

There are 0 best solutions below