fix(installer): handle non-existant installers as 404

This commit is contained in:
AJ ONeal
2023-12-30 23:38:35 -07:00
parent ca183af847
commit 3df90b70b0
+4 -3
View File
@@ -74,9 +74,10 @@ InstallerServer.helper = async function ({
let validTypes = ['alias', 'selfhosted', 'valid'];
if (!validTypes.includes(proj.type)) {
throw new Error(
`'${projectName}' doesn't have an installer: '${proj.type}': '${proj.detail}'`,
);
let msg = `'${projectName}' doesn't have an installer: '${proj.type}': '${proj.detail}'`;
let err = new Error(msg);
err.code = 'ENOENT';
throw err;
}
if (proj.type === 'alias') {
projectName = proj.detail;