diff --git a/src/Exception/CprElementNotFoundInSubmissionException.php b/src/Exception/CprElementNotFoundInSubmissionException.php new file mode 100644 index 0000000..f699bc1 --- /dev/null +++ b/src/Exception/CprElementNotFoundInSubmissionException.php @@ -0,0 +1,5 @@ +configuration['cpr_element'], $submissionData)) { + $this->getLogger()->error( + 'The chosen CPR element not found in submission!' + ); + + throw new \CprElementNotFoundInSubmissionException(); + } + /** @var \Drupal\os2forms_cpr_lookup\CPR\CprServiceResult $cprSearchResult */ $cprSearchResult = $this->cprService->search($submissionData[$this->configuration['cpr_element']]);