diff --git a/CHANGELOG.md b/CHANGELOG.md index ababfd3..ff23991 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -11,6 +11,8 @@ before starting to add changes. Use example [placed in the end of the page](#exa ## [Unreleased] +- [PR-322](https://github.com/OS2Forms/os2forms/pull/322) + Update Digital Post handler error messages. - [PR-320](https://github.com/OS2Forms/os2forms/pull/320) Update README. - [PR-301](https://github.com/OS2Forms/os2forms/pull/301) @@ -424,7 +426,8 @@ f/OS-115_dawa_address - Security in case of vulnerabilities. ``` -[Unreleased]: https://github.com/OS2Forms/os2forms/compare/4.1.0...HEAD +[Unreleased]: https://github.com/OS2Forms/os2forms/compare/5.0.0...HEAD +[5.0.0]: https://github.com/OS2Forms/os2forms/compare/4.1.0...5.0.0 [4.1.0]: https://github.com/OS2Forms/os2forms/compare/4.0.0...4.1.0 [4.0.0]: https://github.com/OS2Forms/os2forms/compare/3.22.2...4.0.0 [3.22.2]: https://github.com/OS2Forms/os2forms/compare/3.22.1...3.22.2 diff --git a/modules/os2forms_digital_post/src/Helper/WebformHelperSF1601.php b/modules/os2forms_digital_post/src/Helper/WebformHelperSF1601.php index 3d079fe..807af27 100644 --- a/modules/os2forms_digital_post/src/Helper/WebformHelperSF1601.php +++ b/modules/os2forms_digital_post/src/Helper/WebformHelperSF1601.php @@ -90,7 +90,7 @@ public function sendDigitalPost(WebformSubmissionInterface $submission, array $h $handlerMessageSettings = $handlerSettings[WebformHandlerSF1601::MEMO_MESSAGE]; $recipientIdentifierKey = $handlerMessageSettings[WebformHandlerSF1601::RECIPIENT_ELEMENT] ?? NULL; if (NULL === $recipientIdentifierKey) { - $message = 'Recipient identifier element (key: @element_key) not found in submission'; + $message = 'Recipient identifier element (key: @element_key) not found in handler settings'; $context = [ '@element_key' => WebformHandlerSF1601::RECIPIENT_ELEMENT, ]; @@ -115,7 +115,7 @@ public function sendDigitalPost(WebformSubmissionInterface $submission, array $h if (NULL === $recipientIdentifier) { $message = 'Recipient identifier element (key: @element_key) not found in submission'; $context = [ - '@element_key' => WebformHandlerSF1601::RECIPIENT_ELEMENT, + '@element_key' => $recipientIdentifierKey, ]; $this->error($message, $context);