From 3262a68a250a43c2e005796448f02b74c237bcc3 Mon Sep 17 00:00:00 2001 From: Pothi Kalimuthu <1254302+pothi@users.noreply.github.com> Date: Tue, 10 Jun 2025 12:40:45 +0530 Subject: [PATCH] Fine-tune the script to reproduce the bug --- test-snippets/email-dns-bug.rsc | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/test-snippets/email-dns-bug.rsc b/test-snippets/email-dns-bug.rsc index 2fdff2f..cca7878 100644 --- a/test-snippets/email-dns-bug.rsc +++ b/test-snippets/email-dns-bug.rsc @@ -6,8 +6,12 @@ # 5. On ideal conditions, we'd get "A friendly message" in the log # 6. Due to bug, we get nothing we email sending fails upon DNS failure. -:do { - /tool e-mail send to=kpothi@gmail.com body="Body Message" subject="Sample subject" -} on-error={ :log error "A friendly message" } +# :do { + # /tool e-mail send to=kpothi@gmail.com body="Body Message" subject="Sample subject" +# } on-error={ :log error "A friendly message" } -:log warn "This message should not be shown" +:onerror errMsg in={ + /tool e-mail send to=name@example.com body="msg" subject="test" +} do={ :error "Email sending failure: $errMsg" } + +:log warn "This message should not be shown, if email sending fails upon DNS failure."