Skip to content

Commit b622e92

Browse files
committed
chore: logging errors
1 parent 8e80b8f commit b622e92

1 file changed

Lines changed: 12 additions & 2 deletions

File tree

packages/console/app/src/lib/github.ts

Lines changed: 12 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,18 @@ export const github = query(async () => {
44
"use server"
55
try {
66
const [meta, releases, contributors] = await Promise.all([
7-
fetch("https://api.github.com/repos/sst/opencode").then((res) => res.json()),
8-
fetch("https://api.github.com/repos/sst/opencode/releases").then((res) => res.json()),
7+
fetch("https://api.github.com/repos/sst/opencode").then(async (res) => {
8+
const text = await res.text()
9+
console.log(text)
10+
const json = JSON.parse(text)
11+
return json
12+
}),
13+
fetch("https://api.github.com/repos/sst/opencode/releases").then(async (res) => {
14+
const text = await res.text()
15+
console.log(text)
16+
const json = JSON.parse(text)
17+
return json
18+
}),
919
fetch("https://api.github.com/repos/sst/opencode/contributors?per_page=1"),
1020
])
1121
const [release] = releases

0 commit comments

Comments
 (0)