mirror of
https://github.com/EnixCoda/Gitako.git
synced 2026-03-11 08:54:44 +00:00
fix: log error when cannot resolve
This commit is contained in:
parent
95a258a9b9
commit
1e9904ff10
1 changed files with 2 additions and 1 deletions
|
|
@ -23,7 +23,8 @@ async function oauth(code: string) {
|
|||
if (errorDescription) {
|
||||
throw new Error(errorDescription)
|
||||
} else if (scope !== 'repo' || !accessToken || !(typeof accessToken === 'string')) {
|
||||
throw new Error(`Cannot resolve response: '${JSON.stringify(res)}'`)
|
||||
console.log(JSON.stringify(body))
|
||||
throw new Error(`Cannot resolve response from GitHub`)
|
||||
}
|
||||
return accessToken
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue