mirror of
https://github.com/reiyua/github-profile-trophy-reiyua-mirror.git
synced 2026-11-17 06:02:09 +11:00
Fix error response property
This commit is contained in:
parent
8a9ad5931b
commit
8f09859d1b
1 changed files with 2 additions and 5 deletions
|
|
@ -124,13 +124,10 @@ export class GithubAPIClient {
|
||||||
headers: { Authorization: `bearer ${token}` },
|
headers: { Authorization: `bearer ${token}` },
|
||||||
},
|
},
|
||||||
).catch((error) => {
|
).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;
|
break;
|
||||||
} else {
|
|
||||||
console.error(`Status code: ${response.status}`);
|
|
||||||
console.error(response.data);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return response.data.data.user;
|
return response.data.data.user;
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue