feat: adde CustomError class for better secondary errors (#355)

This commit is contained in:
Anurag Hazra
2020-08-10 19:36:56 +05:30
committed by GitHub
parent 4df291e697
commit ee513240ef
6 changed files with 29 additions and 15 deletions

View File

@@ -38,12 +38,7 @@ module.exports = async (req, res) => {
parseBoolean(include_all_commits)
);
} catch (err) {
return res.send(
renderError(
err.message,
"Make sure the provided username is not an organization"
)
);
return res.send(renderError(err.message, err.secondaryMessage));
}
const cacheSeconds = clampValue(