Skip to content

Commit

Permalink
Remove abort when <Version /> fetch fails (#3764)
Browse files Browse the repository at this point in the history
  • Loading branch information
yanthomasdev authored Jul 19, 2023
1 parent 503a5c6 commit 5a3662f
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/components/Version.astro
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
---
import pRetry, { AbortError } from 'p-retry';
import pRetry from 'p-retry';
import { cachedFetch } from '../util-server';
export interface Props {
Expand All @@ -16,7 +16,7 @@ const packageInfo = await pRetry(
const json = await response.json();
if (!response.ok) {
throw new AbortError(
throw new Error(
`npm API call failed: GET "${url}" returned status ${response.status}: ${JSON.stringify(
json
)}`
Expand All @@ -25,7 +25,7 @@ const packageInfo = await pRetry(
return json;
},
{ retries: 5 }
{ retries: 10 }
);
const { version } = packageInfo;
Expand Down

0 comments on commit 5a3662f

Please sign in to comment.