Skip to content

Commit 4ca7ec7

Browse files
committed
improve log output of errors
1 parent 7f60173 commit 4ca7ec7

5 files changed

Lines changed: 10 additions & 10 deletions

File tree

.vitepress/data/authors.data.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ export default {
3232
const authorsArray = await Promise.all(
3333
Array.from(authors.values()).map(async (author) => {
3434
try {
35-
if (!GITHUB_TOKEN) throw new Error("GITHUB_TOKEN is unset")
35+
if (!GITHUB_TOKEN) throw new Error("GITHUB_TOKEN is unset");
3636
const { data } = await octokit.rest.users.getByUsername({
3737
username: author.login,
3838
});
@@ -44,7 +44,7 @@ export default {
4444
number: author.files,
4545
} as DefaultTheme.TeamMember & { number: number };
4646
} catch (error) {
47-
console.error("Error: ", error);
47+
console.error(error);
4848
return null;
4949
}
5050
})

.vitepress/data/bot.data.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ export default {
1313
username: LOGIN,
1414
});
1515
} catch (error) {
16-
console.error("Error: ", error);
16+
console.error(error);
1717
return { data: { avatar_url: `https://github.com/${LOGIN}.png` } };
1818
}
1919
})();

.vitepress/data/committers.data.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,13 +8,13 @@ export default {
88
async load() {
99
const contributors = await (async () => {
1010
try {
11-
if (!GITHUB_TOKEN) throw new Error("GITHUB_TOKEN is unset")
11+
if (!GITHUB_TOKEN) throw new Error("GITHUB_TOKEN is unset");
1212
return await octokit.paginate(octokit.rest.repos.listContributors, {
1313
owner: "FabricMC",
1414
repo: "fabric-docs",
1515
});
1616
} catch (error) {
17-
console.error("Error: ", error);
17+
console.error(error);
1818
return [];
1919
}
2020
})();

.vitepress/data/maintainers.data.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -8,13 +8,13 @@ export default {
88
async load() {
99
const members = await (async () => {
1010
try {
11-
if (!GITHUB_TOKEN) throw new Error("GITHUB_TOKEN is unset")
11+
if (!GITHUB_TOKEN) throw new Error("GITHUB_TOKEN is unset");
1212
return await octokit.paginate(octokit.rest.teams.listMembersInOrg, {
1313
org: "FabricMC",
1414
team_slug: "documentation",
1515
});
1616
} catch (error) {
17-
console.error("Error: ", error);
17+
console.error(error);
1818
return [];
1919
}
2020
})();
@@ -24,12 +24,12 @@ export default {
2424
members.map(async (member) => ({
2525
val: await (async () => {
2626
try {
27-
if (!GITHUB_TOKEN) throw new Error("GITHUB_TOKEN is unset")
27+
if (!GITHUB_TOKEN) throw new Error("GITHUB_TOKEN is unset");
2828
return await octokit.paginate(octokit.rest.orgs.listForUser, {
2929
username: member.login,
3030
});
3131
} catch (error) {
32-
console.error("Error: ", error);
32+
//console.error(error);
3333
return [{ login: "FabricMC" }];
3434
}
3535
})(),

.vitepress/data/translators.data.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@ export default {
6262
).json()
6363
).data;
6464
} catch (error) {
65-
console.error("Error: ", error);
65+
console.error(error);
6666
}
6767

6868
const translators = new Map<

0 commit comments

Comments
 (0)