mirror of
https://github.com/tiennm99/github-readme-stats.git
synced 2026-10-03 09:13:29 +00:00
feat: adde CustomError class for better secondary errors (#355)
This commit is contained in:
1 parent
4df291e697
commit
ee513240ef
6 files changed
+29
-15
No files matched your search
+1
-3
@@ -4,7 +4,6 @@ const {
|
||||
parseBoolean,
|
||||
clampValue,
|
||||
CONSTANTS,
|
||||
logger,
|
||||
} = require("../src/common/utils");
|
||||
const fetchRepo = require("../src/fetchers/repo-fetcher");
|
||||
const renderRepoCard = require("../src/cards/repo-card");
|
||||
@@ -29,8 +28,7 @@ module.exports = async (req, res) => {
|
||||
try {
|
||||
repoData = await fetchRepo(username, repo);
|
||||
} catch (err) {
|
||||
logger.error(err);
|
||||
return res.send(renderError(err.message));
|
||||
return res.send(renderError(err.message, err.secondaryMessage));
|
||||
}
|
||||
|
||||
let cacheSeconds = clampValue(
|
||||
|
||||
Reference in new issue
Block a user