fix: remove repository link display on missing param errors (#4560)

* fix: remove repository link display on missing param errors

* fix tests

---------

Co-authored-by: Alexandr <qwerty541zxc@gmail.com>
This commit is contained in:
Ophelia GoldsteinandAlexandr authored and GitHub committed 2025-10-12 23:14:27 +03:00
1 parent 92d6dfa226
commit 90955dca00
7 files changed
+27 -5

No files matched your search

+5 -1
View File
@@ -8,7 +8,10 @@ import {
setCacheHeaders,
setErrorCacheHeaders,
} from "../src/common/cache.js";
import { retrieveSecondaryMessage } from "../src/common/error.js";
import {
MissingParamError,
retrieveSecondaryMessage,
} from "../src/common/error.js";
import { parseBoolean, renderError } from "../src/common/utils.js";
import { fetchRepo } from "../src/fetchers/repo.js";
import { isLocaleAvailable } from "../src/translations.js";
@@ -105,6 +108,7 @@ export default async (req, res) => {
bg_color,
border_color,
theme,
show_repo_link: !(err instanceof MissingParamError),
},
}),
);