]> git.proxmox.com Git - pmg-api.git/commit
reinject mail: improve error logging
authorStoiko Ivanov <s.ivanov@proxmox.com>
Fri, 17 Mar 2023 18:44:52 +0000 (19:44 +0100)
committerThomas Lamprecht <t.lamprecht@proxmox.com>
Thu, 23 Mar 2023 16:25:27 +0000 (17:25 +0100)
commit7c9b530b034bbd64fd1047f9d8a88c735cb78ff3
tree4edfeb9705e36bc39d99cc2cfeb7e4db6510a182
parentceb383cbf947cea573edf8bc4ad32b7bf8927854
reinject mail: improve error logging

this patch unifies the error handling for mail and rcpt with
the data command: all now die with sensible error (which gets logged
in the error-handling of the eval), and it sets the respose message
and code for those commands as well.

additionally it adds a '\n' to all die statements.

this makes it possible to provide information what went wrong at
call-sites (instead of only having it in syslog)

Signed-off-by: Stoiko Ivanov <s.ivanov@proxmox.com>
Reviewed-by: Dominik Csapak <d.csapak@proxmox.com>
Tested-by:  Dominik Csapak <d.csapak@proxmox.com>
src/PMG/Utils.pm