diff --git a/backend/app/Element/UseCases/GetElementPdf/GetElementPdf.php b/backend/app/Element/UseCases/GetElementPdf/GetElementPdf.php index e210c61..cfce117 100644 --- a/backend/app/Element/UseCases/GetElementPdf/GetElementPdf.php +++ b/backend/app/Element/UseCases/GetElementPdf/GetElementPdf.php @@ -31,11 +31,11 @@ class GetElementPdf } if (!$this->isAllowedPdfFolder($request->folder)) { - throw new NotFoundException('PDF not found'); + throw new BadRequestException('folder is invalid'); } if (!$this->isValidPdfFileName($request->fileName)) { - throw new NotFoundException('PDF not found'); + throw new BadRequestException('fileName is invalid'); } $path = "element-pdfs/$request->folder/$request->fileName";