Skip to content

Commit be0ecad

Browse files
committed
[server] drive-by: fix GH education API parse error
1 parent f723601 commit be0ecad

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

components/server/ee/src/user/eligibility-service.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -94,8 +94,9 @@ export class EligibilityService {
9494
logCtx,
9595
`fetching the GitHub Education API failed with status ${rawResponse.status}: ${rawResponse.statusText}`,
9696
);
97+
return { student: false, faculty: false };
9798
}
98-
const result: GitHubEducationPack = JSON.parse(await rawResponse.text());
99+
const result: GitHubEducationPack = await rawResponse.json();
99100
if (result.student && result.faculty) {
100101
// That violates the API contract: `student` and `faculty` need to be mutually exclusive
101102
log.warn(

0 commit comments

Comments
 (0)