catch errors in memcache