Improve error for suspended app
This commit is contained in:
@@ -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`,
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user