improve error handeling for GithubCommitActivity

The author filter error handling removed was redundent as it would never execute, there is no way to seperate branch not found from repo not found.
This commit is contained in:
jNullj
2023-06-14 20:36:46 +03:00
parent 6703fe6452
commit 9e358c8135

View File

@@ -136,7 +136,7 @@ export default class GitHubCommitActivity extends GithubAuthV4Service {
since,
},
},
errorMessages: errorMessagesFor('repo not found'),
errorMessages: errorMessagesFor('repo or branch not found'),
})
}
@@ -152,11 +152,7 @@ export default class GitHubCommitActivity extends GithubAuthV4Service {
return repo.history.totalCount
}
static transformAuthorFilter({ res, buffer }) {
if (buffer.message === 'Not Found') {
throw new InvalidResponse({ prettyMessage: 'invalid branch' })
}
static transformAuthorFilter({ res }) {
const parsed = parseLinkHeader(res.headers.link)
if (!parsed) {