Skip to content

Commit ab100d1

Browse files
authored
Merge pull request #322 from itk-dev/feature/adjust-digital-post-error-messages
Adjust Digital Post error messages
2 parents 6bc862a + 433a83a commit ab100d1

2 files changed

Lines changed: 6 additions & 3 deletions

File tree

CHANGELOG.md

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,8 @@ before starting to add changes. Use example [placed in the end of the page](#exa
1111

1212
## [Unreleased]
1313

14+
- [PR-322](https://github.com/OS2Forms/os2forms/pull/322)
15+
Update Digital Post handler error messages.
1416
- [PR-320](https://github.com/OS2Forms/os2forms/pull/320)
1517
Update README.
1618
- [PR-301](https://github.com/OS2Forms/os2forms/pull/301)
@@ -424,7 +426,8 @@ f/OS-115_dawa_address
424426
- Security in case of vulnerabilities.
425427
```
426428

427-
[Unreleased]: https://github.com/OS2Forms/os2forms/compare/4.1.0...HEAD
429+
[Unreleased]: https://github.com/OS2Forms/os2forms/compare/5.0.0...HEAD
430+
[5.0.0]: https://github.com/OS2Forms/os2forms/compare/4.1.0...5.0.0
428431
[4.1.0]: https://github.com/OS2Forms/os2forms/compare/4.0.0...4.1.0
429432
[4.0.0]: https://github.com/OS2Forms/os2forms/compare/3.22.2...4.0.0
430433
[3.22.2]: https://github.com/OS2Forms/os2forms/compare/3.22.1...3.22.2

modules/os2forms_digital_post/src/Helper/WebformHelperSF1601.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -90,7 +90,7 @@ public function sendDigitalPost(WebformSubmissionInterface $submission, array $h
9090
$handlerMessageSettings = $handlerSettings[WebformHandlerSF1601::MEMO_MESSAGE];
9191
$recipientIdentifierKey = $handlerMessageSettings[WebformHandlerSF1601::RECIPIENT_ELEMENT] ?? NULL;
9292
if (NULL === $recipientIdentifierKey) {
93-
$message = 'Recipient identifier element (key: @element_key) not found in submission';
93+
$message = 'Recipient identifier element (key: @element_key) not found in handler settings';
9494
$context = [
9595
'@element_key' => WebformHandlerSF1601::RECIPIENT_ELEMENT,
9696
];
@@ -115,7 +115,7 @@ public function sendDigitalPost(WebformSubmissionInterface $submission, array $h
115115
if (NULL === $recipientIdentifier) {
116116
$message = 'Recipient identifier element (key: @element_key) not found in submission';
117117
$context = [
118-
'@element_key' => WebformHandlerSF1601::RECIPIENT_ELEMENT,
118+
'@element_key' => $recipientIdentifierKey,
119119
];
120120

121121
$this->error($message, $context);

0 commit comments

Comments
 (0)