diff --git a/components/server/ee/src/user/eligibility-service.ts b/components/server/ee/src/user/eligibility-service.ts index 6c196d855b72b5..b399b6c09c5af3 100644 --- a/components/server/ee/src/user/eligibility-service.ts +++ b/components/server/ee/src/user/eligibility-service.ts @@ -94,8 +94,9 @@ export class EligibilityService { logCtx, `fetching the GitHub Education API failed with status ${rawResponse.status}: ${rawResponse.statusText}`, ); + return { student: false, faculty: false }; } - const result: GitHubEducationPack = JSON.parse(await rawResponse.text()); + const result: GitHubEducationPack = await rawResponse.json(); if (result.student && result.faculty) { // That violates the API contract: `student` and `faculty` need to be mutually exclusive log.warn(