diff --git a/lib/github-glue.ts b/lib/github-glue.ts index 498815a5d8..facb1889d5 100644 --- a/lib/github-glue.ts +++ b/lib/github-glue.ts @@ -464,15 +464,11 @@ export class GitHubGlue { username: login, }); - if (!response.data.name) { - throw new Error(`Unable to get name for ${login} - ${ - response.data.toString()}`); - } return { email: response.data.email, login: response.data.login, - name: response.data.name, + name: response.data.name || "", type: response.data.type, }; } diff --git a/tests/github-glue.test.ts b/tests/github-glue.test.ts index 99cf0607f1..cb1968f8bc 100644 --- a/tests/github-glue.test.ts +++ b/tests/github-glue.test.ts @@ -587,9 +587,7 @@ test("test missing values in response using small schema", async () => { (sampleUser as IPrivateUser).name = null; // if (!response.data.name) { - await expect(github.getGitHubUserInfo(owner)).rejects.toThrow( - /Unable to get name/ - ); + await expect(github.getGitHubUserInfo(owner)).toBeTruthy(); // if (!response.data.name) { await expect(github.getGitHubUserName(owner)).rejects.toThrow(