Top langs card: Remove unreachable code from fetcher and increase tests coverage (#3126)

This commit is contained in:
Alexandr Garbuzov
2023-08-22 09:00:56 +02:00
committed by GitHub
parent 51fcae838e
commit 0ac5280ba6
3 changed files with 27 additions and 8 deletions
-6
View File
@@ -75,12 +75,6 @@ const fetchTopLanguages = async (
const res = await retryer(fetcher, { login: username });
if (res.data.errors) {
logger.error(res.data.errors);
throw Error(res.data.errors[0].message || "Could not fetch user");
}
// Catch GraphQL errors.
if (res.data.errors) {
logger.error(res.data.errors);
if (res.data.errors[0].type === "NOT_FOUND") {