Skip to content

Commit 305ca7b

Browse files
committed
fix: best effort
1 parent d2ef2a2 commit 305ca7b

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/index.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ const createGithubAPI =
3030
const payload = await response.json().catch(() => ({}))
3131

3232
if (!response.ok) {
33-
const code = payload?.errors[0]?.code
33+
const code = payload?.errors?.[0]?.code
3434
let message = payload?.message
3535
if (code) message += ` (${code})`
3636
message += ` – See ${payload?.documentation_url}`

0 commit comments

Comments
 (0)