mirror of
https://github.com/webinstall/webi-installers.git
synced 2026-08-23 22:16:48 +00:00
fix(installer): handle non-existant installers as 404
This commit is contained in:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user