Skip to content

Commit

Permalink
Fix error response property
Browse files Browse the repository at this point in the history
  • Loading branch information
ryo-ma committed Sep 8, 2022
1 parent 8a9ad59 commit 8f09859
Showing 1 changed file with 2 additions and 5 deletions.
7 changes: 2 additions & 5 deletions src/github_api_client.ts
Original file line number Diff line number Diff line change
Expand Up @@ -124,13 +124,10 @@ export class GithubAPIClient {
headers: { Authorization: `bearer ${token}` },
},
).catch((error) => {
console.error(error.response.data.errors[0].message);
console.error(error.response.data);
});
if (response.status === 200) {
if (response.data.data !== undefined) {
break;
} else {
console.error(`Status code: ${response.status}`);
console.error(response.data);
}
}
return response.data.data.user;
Expand Down

0 comments on commit 8f09859

Please sign in to comment.