catch error when git repo is unavailable
This commit is contained in:
parent
9a4720e887
commit
c58221c4d5
1 changed files with 4 additions and 1 deletions
|
@ -19,7 +19,10 @@ async function get() {
|
||||||
// eslint-disable-next-line no-undef
|
// eslint-disable-next-line no-undef
|
||||||
data = Buffer.from(json.content, json.encoding).toString('utf8');
|
data = Buffer.from(json.content, json.encoding).toString('utf8');
|
||||||
timestamp = now;
|
timestamp = now;
|
||||||
}));
|
}))
|
||||||
|
.catch(() => {
|
||||||
|
data = "# Constnium";
|
||||||
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
return data;
|
return data;
|
||||||
|
|
Loading…
Reference in a new issue