Fixed dynamic operator loading not finishing for some operators.

This commit is contained in:
Felix Kaspar
2024-05-16 19:25:54 +02:00
parent efd4bdc493
commit b1bb8e0f02
2 changed files with 17 additions and 14 deletions

View File

@@ -8,7 +8,7 @@ export const JoiPDFFileSchema = Joi.custom((value: Express.Multer.File[] /* <- a
else { // File(s)
const firstWrongFile = value.find(f => f.mimetype != "application/pdf")
if(firstWrongFile)
throw new Error(`at least one of the files provided doesn't seem to be a PDF. Got ${firstWrongFile.mimetype} instead.`);
throw new Error(`at least one of the files provided doesn't seem to be a PDF. Got the file ${JSON.stringify(firstWrongFile)} instead.`);
return PdfFile.fromMulterFiles(value);
}