Ignore errors in getContentOfType

d7a37298aba156a8ebed7848b634cd2cdaa99379

Cohee <18619528+Cohee1207@users.noreply.github.com>

1 files changed, +4 -0Showing whitespace changes
src/endpoints/content-manager.js+4 -0
@@ -232,6 +232,7 @@ function getContentOfType(type, format) {
232232 if (!item.folder) {
233233 continue;
234234 }
235+ try {
235236 const filePath = path.join(item.folder, item.filename);
236237 const fileContent = fs.readFileSync(filePath);
237238 switch (format) {
@@ -245,6 +246,9 @@ function getContentOfType(type, format) {
245246 files.push(fileContent);
246247 break;
247248 }
249+ } catch {
250+ // Ignore errors
251+ }
248252 }
249253 return files;
250254}