diff --git a/src/lib/cache.js b/src/lib/cache.js index 4c6db87..a35ffcf 100644 --- a/src/lib/cache.js +++ b/src/lib/cache.js @@ -130,6 +130,9 @@ class RequestCache extends TtlCache { return this.getOrFetch(key, callback).then(result => { this.cache.delete(key) return result + }).catch(error => { + this.cache.delete(key) + throw error }) } }