diff --git a/libs/output-mapping/src/SourcesValidator/LocalSourcesValidator.php b/libs/output-mapping/src/SourcesValidator/LocalSourcesValidator.php index 5367a054a..2e84defe8 100644 --- a/libs/output-mapping/src/SourcesValidator/LocalSourcesValidator.php +++ b/libs/output-mapping/src/SourcesValidator/LocalSourcesValidator.php @@ -60,7 +60,12 @@ public function validatePhysicalFilesWithConfiguration(array $dataItems, array $ // well, we probably should care about missing write-always sources :-/ if (!$this->isFailedJob) { throw new InvalidOutputException( - sprintf('Table sources not found: %s', implode(', ', $invalidSources)), + sprintf( + 'Output mapping error: The source file %s was not found. ' + . 'Verify that the transformation code creates this file in the output directory, ' + . 'or remove the corresponding output mapping if the file is no longer needed.', + implode(', ', $invalidSources), + ), 404, ); } diff --git a/libs/output-mapping/tests/SourceValidator/LocalSourcesValidatorTest.php b/libs/output-mapping/tests/SourceValidator/LocalSourcesValidatorTest.php index 4af9d1b8b..2f1955468 100644 --- a/libs/output-mapping/tests/SourceValidator/LocalSourcesValidatorTest.php +++ b/libs/output-mapping/tests/SourceValidator/LocalSourcesValidatorTest.php @@ -33,7 +33,9 @@ public function testValidatePhysicalFilesWithManifestWithOrphanedManifest(): voi public function testValidatePhysicalFilesWithConfigurationWithMissingSource(): void { $this->expectException(InvalidOutputException::class); - $this->expectExceptionMessage('Table sources not found: "missing.source"'); + $this->expectExceptionMessage( + 'Output mapping error: The source file "missing.source" was not found.', + ); $dataItems = [$this->createMock(FileItem::class)]; $configurationSource = [$this->createConfiguredMock( diff --git a/libs/output-mapping/tests/Writer/StorageApiLocalTableWriterTest.php b/libs/output-mapping/tests/Writer/StorageApiLocalTableWriterTest.php index ea3bf456d..e8dddd5c5 100644 --- a/libs/output-mapping/tests/Writer/StorageApiLocalTableWriterTest.php +++ b/libs/output-mapping/tests/Writer/StorageApiLocalTableWriterTest.php @@ -577,7 +577,7 @@ public function testWriteTableOutputMappingMissing(): void ], ]; $this->expectException(InvalidOutputException::class); - $this->expectExceptionMessage('Table sources not found: "table81.csv"'); + $this->expectExceptionMessage('Output mapping error: The source file "table81.csv" was not found.'); $tableQueue = $this->getTableLoader()->uploadTables( configuration: new OutputMappingSettings( configuration: ['mapping' => $configs], @@ -1771,7 +1771,7 @@ public function testLocalTableUploadChecksForUnusedMappingEntries(): void $stagingFactory = $this->getLocalStagingFactory(logger: $this->testLogger); $this->expectException(InvalidOutputException::class); - $this->expectExceptionMessage('Table sources not found: "unknown.csv"'); + $this->expectExceptionMessage('Output mapping error: The source file "unknown.csv" was not found.'); $this->getTableLoader( logger: $this->testLogger, strategyFactory: $stagingFactory,