Skip to content

Commit d1ae755

Browse files
authored
Merge pull request #23 from atfromhome/nuradiyana-patch-1
Patch
2 parents 0bfd719 + 77b0c46 commit d1ae755

File tree

2 files changed

+8
-1
lines changed

2 files changed

+8
-1
lines changed

Diff for: src/Jobs/ProcessModelRecordJob.php

+3-1
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,9 @@ public function handle(RecordProcessorManager $manager): void
4141
$this->modelUploadFile->update([
4242
'state' => UploadFileState::error,
4343
'error_message' => \sprintf(
44-
'Invalid `null` action for %s type', $this->modelUploadFile->getAttribute('model_type')
44+
'Invalid `null` action for %s type. Valid type is %s',
45+
$this->modelUploadFile->getAttribute('model_type'),
46+
\implode(', ', $manager->getProcessors())
4547
),
4648
]);
4749

Diff for: src/Processor/RecordProcessorManager.php

+5
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,11 @@ public function registerRecordProcessors(array $processors): void
1515
$this->processors = \array_merge($this->processors, $processors);
1616
}
1717

18+
public function getProcessors(): array
19+
{
20+
return $this->processors;
21+
}
22+
1823
public function getRecordProcessor(string $modelType): ?ModelUploadRecordProcessor
1924
{
2025
$processorClass = $this->processors[$modelType] ?? null;

0 commit comments

Comments
 (0)