unconventional 1.14.0 → 1.14.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -14,7 +14,12 @@ async function getCachedOrFetch(cache, key, fetchFn, ttl = api_types_1.DefaultCa
14
14
  const response = await fetchFn();
15
15
  // Cache if successful
16
16
  if (response && cache) {
17
- await cache.put(key, JSON.stringify(response), { expirationTtl: ttl });
17
+ try {
18
+ await cache.put(key, JSON.stringify(response), { expirationTtl: ttl });
19
+ }
20
+ catch (error) {
21
+ // Suppress cache errors (e.g. rate limiting) so response is still returned
22
+ }
18
23
  }
19
24
  return response;
20
25
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "unconventional",
3
- "version": "1.14.0",
3
+ "version": "1.14.1",
4
4
  "description": "A complete server built on Cloudflare Workers/Pages",
5
5
  "keywords": [
6
6
  "cloudflare",