Skip to content

Commit

Permalink
Fix checking 401 error for GitHub (#19626)
Browse files Browse the repository at this point in the history
  • Loading branch information
filiptronicek authored Apr 15, 2024
1 parent f082bff commit 0130835
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion components/server/src/github/github-context-parser.ts
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@ export class GithubContextParser extends AbstractContextParser implements IConte
}
return await this.handleDefaultContext({ span }, user, host, owner, repoName);
} catch (error) {
if (error && error.code === 401) {
if (error && (error.code === 401 || error.message === "Unauthorized")) {
const token = await this.tokenHelper.getCurrentToken(user);

throw UnauthorizedError.create({
Expand Down

0 comments on commit 0130835

Please sign in to comment.