Improve error for suspended app

This commit is contained in:
Johan Haals
2021-01-14 10:20:44 +01:00
parent e3ae3c29c5
commit 779734303b
2 changed files with 4 additions and 2 deletions
@@ -198,7 +198,7 @@ describe('GithubCredentialsProvider tests', () => {
github.getCredentials({
url: 'https://github.com/backstage',
}),
).rejects.toThrow('The app for backstage is suspended');
).rejects.toThrow('The GitHub application for backstage is suspended');
});
it('should return the default token when the call to github return a status that is not recognized', async () => {
@@ -80,7 +80,9 @@ class GithubAppManager {
} = await this.getInstallationData(owner);
if (suspended) {
throw new Error(
`The app for ${[owner, repo].filter(Boolean).join('/')} is suspended`,
`The GitHub application for ${[owner, repo]
.filter(Boolean)
.join('/')} is suspended`,
);
}