Avoid throwing on getFolderIsImportedBy no folder found

This commit is contained in:
carlosmonastyrski
2025-04-15 10:19:41 -03:00
parent 68ba807b43
commit 82533f49ca
@@ -825,10 +825,7 @@ export const secretImportServiceFactory = ({
); );
const folder = await folderDAL.findBySecretPath(projectId, environment, secretPath); const folder = await folderDAL.findBySecretPath(projectId, environment, secretPath);
if (!folder) if (!folder) return [];
throw new NotFoundError({
message: `Folder with path '${secretPath}' in environment with slug '${environment}' not found`
});
const importedBy = await secretImportDAL.getFolderIsImportedBy(secretPath, folder.envId, environment, projectId); const importedBy = await secretImportDAL.getFolderIsImportedBy(secretPath, folder.envId, environment, projectId);
const deepPaths: { path: string; folderId: string }[] = []; const deepPaths: { path: string; folderId: string }[] = [];