@eduzz/miau-client 1.0.5-rc.113 → 1.0.5

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.
package/dist/index.js CHANGED
@@ -11987,12 +11987,15 @@ var cacheableFetch = async (input, init) => {
11987
11987
  }
11988
11988
  requestsCache.delete(cacheKey);
11989
11989
  }
11990
- const newRequest = reusableFetch(input, init).catch((err) => {
11990
+ try {
11991
+ const newRequest = reusableFetch(input, init);
11992
+ requestsCache.set(cacheKey, newRequest);
11993
+ const result = await newRequest;
11994
+ return result.data;
11995
+ } catch (err) {
11991
11996
  requestsCache.delete(cacheKey);
11992
11997
  throw err;
11993
- });
11994
- requestsCache.set(cacheKey, newRequest);
11995
- return (await newRequest).data;
11998
+ }
11996
11999
  };
11997
12000
  var expiresHeaderToUnixtime = (expires) => {
11998
12001
  return expires ? new Date(expires).getTime() : Date.now() + 6e4;