From eed5e817d5f71761c53efc9819ea718c259fa953 Mon Sep 17 00:00:00 2001 From: nathan Date: Thu, 19 Dec 2024 14:12:13 -0700 Subject: [PATCH] Api: More details in error message if mail can't be merged & sent --- api/src/Storage/Merge.php | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/api/src/Storage/Merge.php b/api/src/Storage/Merge.php index f9904a7b36..0962784fc7 100644 --- a/api/src/Storage/Merge.php +++ b/api/src/Storage/Merge.php @@ -2641,7 +2641,12 @@ abstract class Merge } catch (\Exception $e) { - throw new Api\Exception("Unable to send email", 100, $e); + $msg = "Unable to send email\n" . $e->getMessage(); + if($e->details) + { + $msg .= "\n" . $e->details; + } + throw new Api\Exception($msg, 100, $e); } // Save to VFS so we can link to entry if($link || $download)