Skip to content

Commit 1381961

Browse files
committed
Catch fetch
1 parent cd6d61a commit 1381961

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

packages/util/postinstall.mjs

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,11 @@ async function getWebConfig() {
4949
const response = await fetch(
5050
`https://firebase.googleapis.com/v1alpha/projects/${projectId}/apps/${appId}/webConfig`,
5151
{ headers: { "x-goog-api-key": apiKey } }
52-
);
52+
).catch((e) => {
53+
// TODO add sensible error
54+
console.error(e);
55+
return undefined;
56+
});
5357
if (!response.ok) {
5458
// TODO add sensible error
5559
console.error("yikes.");

0 commit comments

Comments
 (0)